it may not be transmission problem
My mercury villager had CEL on and transmission shifting was rough. I went to Autozone and got codes related to knock sensor, transmission problems etc. Then I sent my car to Ford dealer and they used scanning tools and told me the problem was a bad MAP sensor. They wanted $400 to replace the MAP sensor but I paid them $68 for the diagnosis and replaced the MAP sensor myself for $37.