ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   comparing column data and add if not present (https://www.excelbanter.com/excel-programming/374003-comparing-column-data-add-if-not-present.html)

Rookie_User

comparing column data and add if not present
 
I have the following data:

Order Group 1 Group 2 Group 2 Group 2 |Target1 Target2
782187 PRT |EQP
782679 BPR | BPR
783014 EQP PRT |EQP
783016 EQP PRT |EQP

I would like to check each line and where group1 has a value, check to see
if that value is in the target columns; it could be target1, 2, 3, 4. If it
does exist then do nothing. If it doesn't exist then bring it over into ONE
of the empty columns under either group 1-5 BUT it must not over write an
existing value and it must have a unique value. So the output for this
example would be.

Order Group 1 Group 2 Group 2 Group 2 |Target1 Target2
782187 PRT EQP |EQP
782679 BPR | BPR
783014 EQP PRT |EQP
783016 EQP PRT |EQP

You noticed I only added "EQP to the top line, the others were OK, because
it already had the within the set. I have a few idea's brewing but I thought
I would give the experts a shout to see who finishes first - smile.




All times are GMT +1. The time now is 02:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com