Could be a number of things, but sounds like a pressure or speed problem.
The turbine stator speed is sensed from a sensor on the outside of the gearbox visible when looking at the end off the box under the nearside wheelarch, these often pack up and are a royal pita in the arse to do, as they always snap, not expensive but let someone else ie gearbox place do it, there is a special tool !!
If it's not jumping up and down gears violently then the gear selector that can play up can be ruled out, although this is only £35 anyway and 10 minutes to fit.
First thing to do though is car shop, buy some WYNNS steering stop leak, this is also a seal conditioner, it swells the seals slightly, have just used on a astra that wouldn't engage reverse, level etc ok, it would only engage if done within 1 second of taking out of drive, 100 miles later it is perfect, gear changes are a LOT better as well now, so for £6.99 well worth a go, but I suspect the switch on the side of box, it's very very common, but to be fair they are quite good boxes, unless a early one, but most of these fixed under warranty years ago, they had clutch problems on the early automatic gearboxes.
tabetha