PDA

View Full Version : Merge duplicates with cell color



neulite
02-20-2018, 03:08 PM
I have a list of duplicate cases (column A). Both duplicates have information that the other may or may not have. I would like to somehow merge the duplicate cases and return the non empty value corresponding to the attribute. Additionally, I would like to carry over the cell color (pretend the number colors below are the cell fill colors). Is this possible? See below




Original data







Case
Attribute1
Attribute2
Attribute3
Attribute4
Attribute5


1
36
(blank)
3
AO
3


1
(blank)
apple
3
AO
(blank)


2
(blank)
orange
(blank)
(blank)
85


2
61
(blank)
3
AD
(blank)


3
54
orange
(blank)
BL
40


3
(blank)
(blank)
4
(blank)
(blank)






Output I am looking for







Case
Attribute1
Attribute2
Attribute3
Attribute4
Attribute5


1
36
apple
3
AO
3


2
61
orange
3
AD
85


3
54
orange
4
BL
40

Leith Ross
02-20-2018, 06:18 PM
Crossposted Here (https://www.excelforum.com/excel-programming-vba-macros/1220955-merge-duplicates-with-cell-color.html) earlier today.

georgiboy
02-21-2018, 07:36 AM
Yes, need to read the rules around cross posting.

Also, important point:

Is there only ever two duplicates one above the other?
Or do you have three or more sometimes?