I have a spreadsheet with values in multiple columns “A:Z” I want to find and replace values in Column "B" depending on the value in column "B" and column "C". For example:
If Column B = SWI and Column C = IN then replace SWI with Switch Subscription
But if Column B = SWI and Column C = OUT then replace SWI with Switch Redemption
The table looks like that:
Col B Col C
RED OUT
RED OUT
SWI IN
SWI OUT
SWI IN
SWI OUT
SUB IN
I tried to write the code but it didn't work! Where is the problem?
N = Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To N
v1 = Cells(i, 2).Value
v3 = Cells(i, 3).Value
If v1 = "SWI" And v3 = "IN" Then Cells(i, 2).Value = "Switch Subscription"
If v1 = "SWI" And v3 = "OUT" Then Cells(i, 2).Value = "Switch Redemption"
Next i