Hi not ussed to coding, looking for some help. First of all thank you all.

Im looking for a code that evaluates column M for numbers and puts a vlookup formula on column E. I have the Vlookup formula and now how to do the if but not on coding also i would like it to stop when there are no more numbers on column M.

=IF(M1=1,VLOOKUP(H1,'[RAW DATA.xls]NAMES'!$B:$H,2,FALSE))

This is the formula that I use and excel does not let me evaluate IF M1 equals more than 2 times, it comes back with to many arguments. This is why I need a macro updating the formula for this column takes a lot of time.

Regars

Thank you in advance!