So I have these two lines of code in VBA that find an empty cell at the bottom of a column and then return a pointer the next cell.
RowPointer = ThisWorkbook.Sheets("Current").Cells(65000, 4).End(xlUp).Row
If ThisWorkbook.Sheets("Current").Cells(RowPointer, 4).Formula <> "" Then RowPointer = RowPointer + 1
The problem is this searches from the bottom up, and I need to find the first empty cell in a column not the last. I've seen a few ways to fix this that use a loop to go through the column but the spreadsheet I'm working with is rather large and a loop would take a long time to execute. So my question is is there an easy way to search through a column from the top down to find the first empty cell?
A1:A10andA12-A20are non-empty then first blank =A11, last non-empty =A20, no?Find(although admittedly I did link back to a non-blank in a row rather than a blank in a column question) ....Set ws = Sheets("Current")thenSet rng1 = ws.Columns(4).Find("", ws.Cells(Rows.Count, "D"), xlFormulas, , xlByColumns, xlNext)would find the first blank result