First, I wish to extend my gratitude to all of you who particpate in this forum. Thanks!
I am strugling on developing a macro to read through a worksheet's column (cell by cell), find the literal "Total", and then select the cell.
Specifically, I am unable to develop the code that performs the fuzzy search - the literal is not exlusive, but has other data in the liteal.
Here is my feeble attempt:
Sub FindString()
' Position to first cell in Spread sheet.
Range("A3").Select
Dim wks As Worksheet
Set wks = ActiveSheet
' Last cell is always a total, so color it.
Selection.End(xlDown).Select
Selection.Interior.ColorIndex = 35
' Start reading back to top work sheet.
r = ActiveCell.Row
For r = r To 3 Step -1
x = ActiveCell.Row
y = ActiveCell.Column
*** this is where I need help.
If Cells = "Total" Then
***
wks.Cells(x, y).Select
End If
Next r
End Sub
I am strugling on developing a macro to read through a worksheet's column (cell by cell), find the literal "Total", and then select the cell.
Specifically, I am unable to develop the code that performs the fuzzy search - the literal is not exlusive, but has other data in the liteal.
Here is my feeble attempt:
Sub FindString()
' Position to first cell in Spread sheet.
Range("A3").Select
Dim wks As Worksheet
Set wks = ActiveSheet
' Last cell is always a total, so color it.
Selection.End(xlDown).Select
Selection.Interior.ColorIndex = 35
' Start reading back to top work sheet.
r = ActiveCell.Row
For r = r To 3 Step -1
x = ActiveCell.Row
y = ActiveCell.Column
*** this is where I need help.
If Cells = "Total" Then
***
wks.Cells(x, y).Select
End If
Next r
End Sub