ok this does not work but I'll post it so you can see what I'm trying to do, returns #REF
"=IF(OR(W886="cp",W886="f",W886="m",W886="o",W886="of",W886="sf"),MAX(AH$5:ROW()-1)+1,"")"
If you don't follow what that is trying to do... I keep track of mileage and expenses for a business vehicle...