View Full Version : how to use VLOOKUP only for blank cells in column A

03-29-2011, 02:10 PM
Hi all, I am having trouble finishing the macro and was wondering if someone could help me out with below. Here is the summary:

1) I need to use VLOOKUP in Column A (starting Cell A3 and all the way down, this is where I would utalize LastRow=Cell.Find("*".[A1],,, xlByRows, xlPrevious).Row
2) In total I have 4,000 rows (changes daily though)
3) there are about 1,000 random blank cells in column A
4) I need VLOOKUP to loop/scan the whole column and populate the vlookup formula only for blank cells

Any help would be much appreciated. I was thinking of using autofilter, finding blank cells, but I was hoping there is an easier way

Thanks so much

03-29-2011, 02:54 PM

Range("A3:A" & LastRow).SpecialCells(xlCellTypeBlanks).Formula = WorksheetFunction.VlookUp(blah blah)
for limit of specialcells : http://www.rondebruin.nl/specialcells.htm

03-29-2011, 02:58 PM
i'm not sure if it is a typo....

for last row try:

LastRow = Cells.Find("*", searchorder:=xlByRows, searchdirection:=xlPrevious).Row

03-30-2011, 12:43 PM
awesome.. works great. thanks a lot