Merging/combining dup data in rows and Summing data in columns

FMPOTTER

New Member
Joined
Jul 10, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
I have a four column worksheet. Columns A and B have duplicate data while the data in Columns C and D is distinct. I want to consolidate all the rows where there is duplicate data in Columns A and/or B and SUM the totals in Columns C and D respectively. The below screenshot samples show the before and after desired results. ***I DO NOT WANT TO REMOVE DUPLICATE ROWS AS THIS ALSO REMOVES DATA IN COLUMNS C & D THAT NEEDS TO BE SUBTOTALED.

Example:

Before screenshot_300x300.jpg
After screenshot_300x300.jpg


Can anyone help?
 

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.
Cannot manipulate data in a picture. Please use XL2BB to upload this data so that we can manipulate the data and supply you with a workable solution.
 
Upvote 0
Something like:

Excel Formula:
=UNIQUE(A5:B21)

Excel Formula:
=SUMIFS(C5:C21,A5:A21,G5:G10,B5:B21,H5:H10)

Excel Formula:
=SUMIFS(D5:D21,A5:A21,G5:G10,B5:B21,H5:H10)
 
Upvote 0
Something like:

Excel Formula:
=UNIQUE(A5:B21)

Excel Formula:
=SUMIFS(C5:C21,A5:A21,G5:G10,B5:B21,H5:H10)

Excel Formula:
=SUMIFS(D5:D21,A5:A21,G5:G10,B5:B21,H5:H10)
This is not a viable option because the examples I showed in the "After
Cannot manipulate data in a picture. Please use XL2BB to upload this data so that we can manipulate the data and supply you with a workable solution.
I cannot load the XL2BB add-in to XL on my machine. It tells me it cannot install in "Protected View" and I can't figure out how to turn that off.
 
Upvote 0
Something like:

Excel Formula:
=UNIQUE(A5:B21)

Excel Formula:
=SUMIFS(C5:C21,A5:A21,G5:G10,B5:B21,H5:H10)

Excel Formula:
=SUMIFS(D5:D21,A5:A21,G5:G10,B5:B21,H5:H10)
These formulas can't work because you are referencing cell ranges in the "After" screenshot that is the desired result. That is the format I want the final data to look like. Let me further explain. First, my worksheet has 16,500 rows of data. Think of each row being its own unique transaction. So technically, while there are duplicate listings of the same vendor and vendor address in columns A and B, each row is in fact unique. I want to consolidate all the vendors and addresses into single unique rows but total all the transactions in columns C and D for each.

1. I want to merge or consolidate all rows of data in Column A and Column B, resulting in a single unique line item for each entry in each column.
2. At the same time, I want to SUM all the rows in Column C and Column D for each entry in Columns A and B.
 
Upvote 0
If you cannot make XL2BB work, then load your file to either Box.net or Dropbox.com so that we can work with real data instead of guessing.
 
Upvote 0
I cannot load the XL2BB add-in to XL on my machine. It tells me it cannot install in "Protected View" and I can't figure out how to turn that off.
  1. Go to File > Options.
  2. Select Trust Center > Trust Center Settings > Protected View.
  3. Clear the box for Enable Protected View for files originating from the internet.
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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