Append text in a column field in a table from duplicate rows from another table

rkaczano

Board Regular
Joined
Jul 24, 2013
Messages
141
Office Version
  1. 365
Platform
  1. Windows
I am removing duplicates from a table (into second table) AND appending text values from that first table in a given column. I am unsure how to approach the append portion of that logic.

I have a table with duplicates (column C) . In that table, there is a field (column D) that has text values that can vary by commas (1 or 1,14, or 16,64 etc). I am pulling the data from table 1 into a second table that is using the Unique function to remove the duplicates values in column C. But I also need to append the values from duplicates that I removed from column D in the first table.

The formula below in the second table checks to see if its row (I6) returns a count = 1 in the first table, if so, this implies no duplicate exists and simply pulls the value over to the second table from $D$6:$D$230. I need an Else condition that appends the values in column D for the duplicates if the Countif equals > 1. I need to copy this formula down so that it fully populates the second table.

=IF(COUNTIF($C$6:$C$230,I6)=1,XLOOKUP(I6,$C$6:$C$230,$D$6:$D$230),APPEND VALUES)

Thanks
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Any chance that you could give us a small set of sample data and the expected results with XL2BB?
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,243
Members
448,555
Latest member
RobertJones1986

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top