I am pretty new to VBA, however i have been tryinig to crack looping macros, and had a bit of success with it so far. However i cant seem to get this one. What i want the macro to do is go down column AW from row 6 down. Every time it encouters a 1, i want it to go to column b in the row the 1 is on. If that cell contains a 40, i need it to replace it with an "11". if the cell contains a 50, i need it to replace it with a "01". Then, on the same row, in column C replace what is there with a "Cook". Once this has ended, continue down Column AW till it reaches another "1"
Here is my attempt so far, any help with this would be amazing!
Dim Z As Range, rng
Set rng = Range("AW6:AW" & Range("AW65536").End(xlUp).Row)
For Each Z In rng
If InStr(Z, "1") Then
If InStr(Z.Offset(0, -47), "40") Then
Z.Offset(0, -47).Select
ActiveCell.FormulaR1C1 = "11"
End If
If InStr(Z.Offset(0, -47), "50") Then
Z.Offset(0, -47).Select
ActiveCell.FormulaR1C1 = "01"
End If
Z.Offset(0, -46).Select
ActiveCell.FormulaR1C1 = ""Cook""
End If
Next Z
Bookmarks