I have a macro in which I have to count the number of non empty cells in a row.
I have given the code as follows
But when i run this code, its showing the error "subscript out of range"
Can you tell me how to solve this problem?
I have given the code as follows
Code:
Dim re As Long
re = Worksheets("Sheet1").Range("B2", Range("B2").End(xlDown)).Count
Can you tell me how to solve this problem?