Forum Discussion
InThought
Dec 11, 2024Copper Contributor
Rename Cell Contents
Have given this macro a shot, but it isn't working: Sub StandardizePayee() For i = 1 To Cells(Rows.Count, "A").End(xlUp).Row If Cells(i, "B").Value = "Marathon" Then Cells...
Kidd_Ip
Dec 14, 2024MVP
Try this:
Sub StandardizePayee()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("SheetName") ' Replace "SheetName" with your actual sheet name
For i = 1 To ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
If ws.Cells(i, "B").Value = "Marathon" Then
ws.Cells(i, "B").Value = "Marathon Gas"
End If
Next i
End Sub