I am trying to use an if statement such as Cell B1 contains =If(A1<>"",vlookup(A1,data,2,false),""). I have this formula duplicated down the page. I basically want to perform the lookup only if cell A1 is not empty. When I sort the list by column B, the ones that the formula made blank, appear at the top of the list. (The info returned by the lookup is text. I tested numeric values and the blanks appear at the bottom)

Is there any other way to show the blank other than "" in the if statement?

I am using a macro to enter the vlookup formula for a user that isn't familiar with Excel but the list size varries so I run the formula down the page because I don't know how to tell the macro how far to go.

I need to be able to solve either the blank problem or the lookup problem mentioned in the above paragraph.

I would sure appreciate some assistance.

Thanks!