Here is what I would like to do:
Start on Row 2
If LastName, FirstName, City, State columns in Row 2 are the same as Row 3
BUT Row 2 Agent Code is different than Row 3 Agent Code,
THEN return the following in cell A18030:
Row 2 StateCode "-" Agent Code "/" Row 3 StateCode "-" AgentCode (example: 18-3130/18-2580)
THEN start on Row 3 and compare to Row 4, doing the same thing and if it is true the result would be returned to A18031.
It should move down the column comparing one row to the next row until it gets to the last row, returning result in 1 row down from previous result.
IF it gets to the last row (18023) and it has not found a match, then it should return "Sorry, None Found" n cell A18030.
There are 18023 rows.
Here are my columns:
B = StateCode
C = AgentCode
P = LastName
Q = FirstName
R = City
S = State
Here is the part I have so far,, but the looping has thrown me for a loop:
If (P2 = P3) Then
If (Q2 = Q3) Then
If (R2 = R3) Then
If (S2 = S3) Then
If (C2 <> C3) Then
B2 "-" + C2 + "/" + B3 + "-" + C3
I have been away from VB for so long I remember virtually nothing, so please be very specific in your response (where do I paste your code? "highlight "ThisWorkbook" on the left in the Project area, 1st dropdown on right = General, 2nd dropdown on right = Declarations")
Thank you so much for any help you can provide.
Start on Row 2
If LastName, FirstName, City, State columns in Row 2 are the same as Row 3
BUT Row 2 Agent Code is different than Row 3 Agent Code,
THEN return the following in cell A18030:
Row 2 StateCode "-" Agent Code "/" Row 3 StateCode "-" AgentCode (example: 18-3130/18-2580)
THEN start on Row 3 and compare to Row 4, doing the same thing and if it is true the result would be returned to A18031.
It should move down the column comparing one row to the next row until it gets to the last row, returning result in 1 row down from previous result.
IF it gets to the last row (18023) and it has not found a match, then it should return "Sorry, None Found" n cell A18030.
There are 18023 rows.
Here are my columns:
B = StateCode
C = AgentCode
P = LastName
Q = FirstName
R = City
S = State
Here is the part I have so far,, but the looping has thrown me for a loop:
If (P2 = P3) Then
If (Q2 = Q3) Then
If (R2 = R3) Then
If (S2 = S3) Then
If (C2 <> C3) Then
B2 "-" + C2 + "/" + B3 + "-" + C3
I have been away from VB for so long I remember virtually nothing, so please be very specific in your response (where do I paste your code? "highlight "ThisWorkbook" on the left in the Project area, 1st dropdown on right = General, 2nd dropdown on right = Declarations")
Thank you so much for any help you can provide.