Please let me know how we can match as per below
Meet Google Drive – One place for all your files
I am looking for a macro that will see E2 in in column N , test column D to read the opposite of E2
I have the following but not coming good
code
Sub relatedpartyelimination()
lastrow = Sheets("Comm").Cells(Rows.Count, 1).End(xlUp).Row
v = 3
MsgBox lastrow
For *** = 2 To lastrow
x = Cells(***, 1).Value
u = Cells(***, 4).Value
fr = Cells(***, 5).Value
Z = Cells(***, 6).Value
If u = "Purchase of Goods" Then
u1 = "Sales of Goods"
If u = "Purchase of Services" Then
u1 = "Sales of Services"
End If
If u = "Amount Receivables" Then
u1 = "Amount Payables"
End If
If u = "Balances Payables with FSCM" Then
u1 = "Balances Payables with FSCM"
End If
End If
ot = 3
Do While ot < lastrow
If Cells(ot, 5).Value = x And Cells(ot, 4) = u1 Then
Cells(***, 7).Value = Cells(ot, 6).Value
End If
ot = ot + 1
Loop
Next ***
End Sub
Meet Google Drive – One place for all your files
I am looking for a macro that will see E2 in in column N , test column D to read the opposite of E2
I have the following but not coming good
code
Sub relatedpartyelimination()
lastrow = Sheets("Comm").Cells(Rows.Count, 1).End(xlUp).Row
v = 3
MsgBox lastrow
For *** = 2 To lastrow
x = Cells(***, 1).Value
u = Cells(***, 4).Value
fr = Cells(***, 5).Value
Z = Cells(***, 6).Value
If u = "Purchase of Goods" Then
u1 = "Sales of Goods"
If u = "Purchase of Services" Then
u1 = "Sales of Services"
End If
If u = "Amount Receivables" Then
u1 = "Amount Payables"
End If
If u = "Balances Payables with FSCM" Then
u1 = "Balances Payables with FSCM"
End If
End If
ot = 3
Do While ot < lastrow
If Cells(ot, 5).Value = x And Cells(ot, 4) = u1 Then
Cells(***, 7).Value = Cells(ot, 6).Value
End If
ot = ot + 1
Loop
Next ***
End Sub