There is a tremendous amount in the archives on this issue that show you how to troubleshoot this issue.
Play with the search function and you should be able to find a lot of information.
My local MB mechanic tells me that 90% of the time, and upshift delay valve code is usually caused by a vacum leak in the upshift delay valve, located on the side on the transmission.
2001 E430, Bourdeaux Red, Oyster interior.
1973 280SE 4.5, 170,000 miles. 568 Signal Red, Black MB Tex. "The Red Baron".