Reputation: 55
What Im trying to achieve is to count non blank cells in row lRow
. I got error on third line of the macro. I have no idea how to fix it.
Sub CountNonEmptyCells()
lRow = Cells(Rows.Count, 1).End(xlUp).Row
Rows(lRow).SpecialCells(xlCellTypeConstants, 23).Cells.Count
MsgBox lRow
End Sub
Upvotes: 1
Views: 1385
Reputation: 55
never mind, I fixed it myself:
Sub CountNonEmptyCells()
lRow = Cells(Rows.Count, 1).End(xlUp).Row
x = Rows(lRow).SpecialCells(xlCellTypeConstants, 23).Cells.Count
MsgBox x
End Sub
Upvotes: 1