Hi everyone
I want to add a text 's' to column G if the value of cell in column J is 'New'. And I want to apply the vba across the entire workbook.
I have done the code below but I have no idea how to apply it to the whole workbook. Also I may have done the code wrong as there is nothing happened when I run the macro. Please could anyone help please.
I want to add a text 's' to column G if the value of cell in column J is 'New'. And I want to apply the vba across the entire workbook.
I have done the code below but I have no idea how to apply it to the whole workbook. Also I may have done the code wrong as there is nothing happened when I run the macro. Please could anyone help please.
Code:
Sub Add_S()
Application.ScreenUpdating = False
Dim ws As Worksheet
Dim x As Long, LastRow As Long
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For x = LastRow To 1
If Cells(x, 10).Value = "New" Then
Cells(x, 7).Value = "s"
End If
Next x
End Sub