Hello community,
I am trying to find last non-blank cell in F2:O2
I tried this way. But it finds first
For example in following example I need to set range from Younger to Older. But my code stops at middle age
I am trying to find last non-blank cell in F2:O2
I tried this way. But it finds first
VBA Code:
Dim c
For Each c In sh.Range(Cells(2, 6 + x).Address, Cells(2, 6 + x).Offset(0, 9))
If c = "" Then
lc = c.Column
Exit For
End If
Next
If lc = 0 Then lc = 9 + x
For example in following example I need to set range from Younger to Older. But my code stops at middle age
YOUNGER | MIDDLE AGE | OLDER |