I am new to vba and creating a macro to determine whether there are no, 1 or 2 or more used cells in column A. I have done the following but can't understand why it is working if there is 1 used cell. If there is an easier way that would be good, but I would also like to know why this doesn't work
[VBA]If IsEmpty(Cells(1, 1)) Then
MsgBox "No cells"
End If
If (IsEmpty(Cells(2, 1)) And IsEmpty(Cells(1, 1) = False)) Then
MsgBox "1 cell"
End If
If (IsEmpty(Cells(1, 1)) = False And IsEmpty(Cells(2, 1)) = False) Then
MsgBox "2 or more cells"
End If[/VBA]
Muchas gracias everyone !!