Consolidate (or Remove Duplicates) on range with 4 columns, and count totals for 1 column only

lamensterms

New Member
Joined
Apr 19, 2016
Messages
17
Office Version
  1. 365
Platform
  1. Windows
Hey,

I'm not sure if this is a unique task or I'm just not using the right search terms when Googling... hoping to get steered in the right direction.

My situation... I regularly have to process poorly collated data (extracted from software that doesn't have very good reporting feature). The data is part lists for steel fabrication. The raw data is a formatted as a single row for each instance of a part, that is if I have 4-off of "part 1", there will be 4 rows, each with "part 1" showing a quantity of 1-off. I could use the Consolidate feature if I am working with only 2 columns, but I am working with 4 columns, and I only want to SUM 1 column's data. Sorry for the poor explanation

Does anyone know of a good method to achieve this? My current method works quite well, but is a bit tedious and I am hoping there is a more efficient way

What I've got:
1667893493039.png


What I need:
1667893514712.png
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I should add... I've played around with Pivot Tables, but can't get it in the desired format.
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Thanks for that (y)
How about
Excel Formula:
=LET(u,UNIQUE(A2:D25),s,SUMIFS(B:B,A:A,INDEX(u,,1)),IF({1,2,3,4}=2,s,u))
 
Upvote 0
Thanks for that (y)
How about
Excel Formula:
=LET(u,UNIQUE(A2:D25),s,SUMIFS(B:B,A:A,INDEX(u,,1)),IF({1,2,3,4}=2,s,u))
Thanks Fluff.

Where can I apply this formula? I get a #NAME? error when pasting into cells adjacent to the source range
 
Upvote 0
Ok, sounds like you don't have the LET function, do you have the UNIQUE function?
 
Upvote 0
Ok, how about
Excel Formula:
=IF({1,2,3,4}=2,SUMIFS(B:B,A:A,INDEX(UNIQUE(A2:D25),,1)),UNIQUE(A2:D25))
 
Upvote 0
Ok, how about
Excel Formula:
=IF({1,2,3,4}=2,SUMIFS(B:B,A:A,INDEX(UNIQUE(A2:D25),,1)),UNIQUE(A2:D25))
Wow Fluff! That works great! Thanks a lot for that

How do you get a single cell formula to create a range like this?
 
Upvote 0

Forum statistics

Threads
1,214,980
Messages
6,122,563
Members
449,088
Latest member
Motoracer88

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