Formula to get unique summary from data instead of Pivot/duplicate remove option

harinsh

Active Member
Joined
Feb 7, 2012
Messages
273
Hi Team,

I am looking for some help here, I have base data and need to get the unique info based on one criteria in the below example is is "Category".

Why I am looking formula is because it should dynamic and should not perform pivot/remove duplicate every time.


Base Data
[TABLE="width: 405"]
<colgroup><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Project[/TD]
[TD]Category[/TD]
[TD]Assigned To[/TD]
[TD]Customer[/TD]
[TD]Hours[/TD]
[TD]Days[/TD]
[/TR]
[TR]
[TD]Project 1[/TD]
[TD]Category 1[/TD]
[TD]Employee 1[/TD]
[TD]Cust 1[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]59[/TD]
[/TR]
[TR]
[TD]Project 3[/TD]
[TD]Category 1[/TD]
[TD]Employee 2[/TD]
[TD]Cust 1[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]59[/TD]
[/TR]
[TR]
[TD]Project 2[/TD]
[TD]Category 2[/TD]
[TD]Employee 4[/TD]
[TD]Cust 2[/TD]
[TD="align: right"]400[/TD]
[TD="align: right"]31[/TD]
[/TR]
[TR]
[TD]Project 4[/TD]
[TD]Category 2[/TD]
[TD]Employee 3[/TD]
[TD]Cust 2[/TD]
[TD="align: right"]400[/TD]
[TD="align: right"]31[/TD]
[/TR]
[TR]
[TD]Project 8[/TD]
[TD]Category 2[/TD]
[TD]Employee 1[/TD]
[TD]Cust 2[/TD]
[TD="align: right"]400[/TD]
[TD="align: right"]31[/TD]
[/TR]
[TR]
[TD]Project 5[/TD]
[TD]Category 3[/TD]
[TD]Employee 2[/TD]
[TD]Cust 3[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]39[/TD]
[/TR]
[TR]
[TD]Project 6[/TD]
[TD]Category 4[/TD]
[TD]Employee 4[/TD]
[TD]Cust 5[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD]project 9[/TD]
[TD]Category 4[/TD]
[TD]Employee 1[/TD]
[TD]Cust 5[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD]Project 7[/TD]
[TD]Category 5[/TD]
[TD]Employee 1[/TD]
[TD]Cust 2[/TD]
[TD="align: right"]750[/TD]
[TD="align: right"]24[/TD]
[/TR]
</tbody>[/TABLE]

Require Output
[TABLE="width: 153"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Category[/TD]
[TD]Hours[/TD]
[/TR]
[TR]
[TD]Category 1[/TD]
[TD="align: right"]500[/TD]
[/TR]
[TR]
[TD]Category 2[/TD]
[TD="align: right"]400[/TD]
[/TR]
[TR]
[TD]Category 3[/TD]
[TD="align: right"]300[/TD]
[/TR]
[TR]
[TD]Category 4[/TD]
[TD="align: right"]500[/TD]
[/TR]
[TR]
[TD]Category 5[/TD]
[TD="align: right"]750[/TD]
[/TR]
</tbody>[/TABLE]

Thank you,
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
How about

Excel 2013/2016
ABCDEFGHI
1ProjectCategoryAssigned ToCustomerHoursDaysCategoryHours
2Project 1Category 1Employee 1Cust 150059Category 1500
3Project 3Category 1Employee 2Cust 150059Category 2400
4Project 2Category 2Employee 4Cust 240031Category 3300
5Project 4Category 2Employee 3Cust 240031Category 4500
6Project 8Category 2Employee 1Cust 240031Category 5750
7Project 5Category 3Employee 2Cust 330039
8Project 6Category 4Employee 4Cust 55009
9project 9Category 4Employee 1Cust 55009
10Project 7Category 5Employee 1Cust 275024
Project
Cell Formulas
RangeFormula
I2=IFERROR(INDEX($E$2:$E$10,MATCH(H2,$B$2:$B$10,0)),"")
H2{=IFERROR(INDEX($B$2:$B$10,MATCH(0,COUNTIF($H$1:H1,$B$2:$B$10),0)),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Hi Fluff,

Thanks for your quick solution.

Its working perfect but taking more time in calculating ..is it because of array function? Is there any way to speed up the formula? Thank you
 
Upvote 0
How about
=IFERROR(INDEX($B$2:$B$10,MATCH(0,INDEX(COUNTIF($H$1:H1,$B$2:$B$10),,),)),"")
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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