Hi Bruce2E44,

Yep a VLookup will work but the how many rows over needs an If statement it in. Put the following in E2 and pull the formula down.
=VLOOKUP(B2:B2,'Lookup Table'!$A$5:$E$12,IF(D2="AD",3,IF(D2="ST",4,5)),FALSE)
I think that will do ya.