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!
The subject vehicle has an idle surge problem, but it will only surge when it's in Park or Neutral.
Surge ranges from about 700-900.
Fuel trims (short and long) are spot on.
MAF sensor numbers are within spec
Smoke tested intake, no leaks
Pulled connector on IAC, and idle dropped to min idle.
Performed test of EGR system by energizing EGR vacuum valve; engine shuts off when vacuum control valve is energized at idle. Raise the idle to 1500, and voltage at the EGR differential pressure sensor goes to 3.5VDC (.7 VDC at idle). Spec is .5 - 1 VDC at idle.
Long block is a reman with 700 miles on it.
O2 sensor signals look good.
No DTCs.
Truck will accelerate well with no hesitation when you floor it, so I don't suspect low-fuel pressure.