I had same problem a couple of months back, paper clip tests showed 19 code, purchased genuine VX part new crank sensor, (£65 with VX partner dioscount),
on removal of old one, I noticed the sensor end at gearbox was coverd in fresh oil (just done a recent 3000 mile filter and oil change). Apparently I did not nip up the filter canister tight enough and oil was being sprayed up onto sensor causing it to malfunction.(gearbox erratic behaviour 2-3rd change up slow and intermittent high revving etc). I cleaned the old one in situ, re-tightened both filter canister and also checked torque setting on sump plug and bingo....guess what

, car running again smoothly again. So now I have a spare brand new crankshaft sensor still to fit at sometime in the future when I have a couple of hours spare. Hope this might help with diagnosis.