Reputation: 23
So I have this table, if cell in column P matches cell in column V, replace Q cell with value from column W.
I found this vba script, but doesn't do what I really need I cant figure out how to edit it.
Can you help me ?
Upvotes: 2
Views: 76
Reputation: 96771
Consider:
Sub Substi_toot()
Dim i As Long, N As Long
N = Cells(Rows.Count, "P").End(xlUp).Row
For i = 1 To N
If Cells(i, "P") = Cells(i, "V") Then Cells(i, "Q") = Cells(i, "W")
Next i
End Sub
Upvotes: 1