N
neil_val
Hi,
I have this code:
Sub LastRow()
Dim a As Integer
For a = 12 To 100
''' If Range("A" & a) = "" Then
''' LastR = a - 1
''' Exit For
''' Else
If Left(Range("A" & a), 5) = "Total" Then
LastR = a - 1
Exit For
Else
End If
Next a
End Sub
at the moment this code finds the last row, what I would like the code
to do as well if there are empty rows above "Total" then minus them
until the code finds the row with data in it.
Thanks
I have this code:
Sub LastRow()
Dim a As Integer
For a = 12 To 100
''' If Range("A" & a) = "" Then
''' LastR = a - 1
''' Exit For
''' Else
If Left(Range("A" & a), 5) = "Total" Then
LastR = a - 1
Exit For
Else
End If
Next a
End Sub
at the moment this code finds the last row, what I would like the code
to do as well if there are empty rows above "Total" then minus them
until the code finds the row with data in it.
Thanks