manrique83
Programmer
I have the following rows
Account Tin Action
111111 4444444
111111 4444444 disregard
111111 4444444 checked
I need to keep rows where there is no action. If there is an action and it is fixed, I need to keep that one instead. I have come up with the programming logic, but my macro is getting nowhere.
Here is the pseudo code.
Read record
Save as old
Read next record
Save as new
If new record (Account and TIN) = old record (Account and Tin)
if new record (Action) = "checked"
keep new record
delete old record
else
keep new record
delete old record
End if
the records are sorted and will always be " ", "checked", "fixed
Account Tin Action
111111 4444444
111111 4444444 disregard
111111 4444444 checked
I need to keep rows where there is no action. If there is an action and it is fixed, I need to keep that one instead. I have come up with the programming logic, but my macro is getting nowhere.
Here is the pseudo code.
Read record
Save as old
Read next record
Save as new
If new record (Account and TIN) = old record (Account and Tin)
if new record (Action) = "checked"
keep new record
delete old record
else
keep new record
delete old record
End if
the records are sorted and will always be " ", "checked", "fixed