Hello
I'm trying to adapt the following to do something very similar, but struggling to get it to work.
The following code finds the word "TOTAL" (exactly) in a cell in Column A and then sets the height of the row below to 2.
1) I have a requirement where I need to find cells in Column A where the formula LEN(A1) = 9 and LEFT(A1,2) = "RI" or "RE" or "RW".
Appreciate any assistance. Thank you.
I'm trying to adapt the following to do something very similar, but struggling to get it to work.
The following code finds the word "TOTAL" (exactly) in a cell in Column A and then sets the height of the row below to 2.
1) I have a requirement where I need to find cells in Column A where the formula LEN(A1) = 9 and LEFT(A1,2) = "RI" or "RE" or "RW".
VBA Code:
Dim c As Range
Dim FirstAddress As String
Set c = Columns("A").Find(What:="TOTAL", LookIn:=xlValues, Lookat:=xlWhole, MatchCase:=True)
If Not c Is Nothing Then
FirstAddress = c.Address
Do
c.Offset(1, 0).RowHeight = 2
Set c = Columns("A").FindNext(c)
Loop While Not c Is Nothing And c.Address <> FirstAddress
End If
Appreciate any assistance. Thank you.