Help us help you. By posting the year, make, model and engine near the beginning of your help request, followed by the symptoms (no start, high idle, misfire etc.) Along with any prevalent Diagnostic Trouble Codes, aka DTCs, other forum members will be able to help you get to a solution more quickly and easily!
I had one recently with a similar issue. It was the manual mode position switch sticking at times. If your shifter has has the manual mode/bump shift shifter you may want to check scanner data for the position switch. I think there were three switches total. Up, down and manual.