Need a check on cells for empty/null cells past a column header
vba excel 2010
I have this code trying to count my rows: The data will either be in Column 1(a) Or Column 2(b)
While Len(.Cells(lastRow, 1)) > 0 Or Len(.Cells(lastRow, 2)) > 0
lastRow = lastRow + 1
Wend
The column Header are always in rows 3
Sometimes in Column1 the cells will be empty and i need to calculate the rows in Column2
Both Column cells will never be both filled in:
Will always look like this:
Column1 Column2
account track <---- row 3
11111
22321
445436
Or
Column1 Column2
account track <---- row 3
32de4
656768yu
65tgty
The code above seems ok(working), just wanting to make sure
Thanks
fordraiders
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.