Need to find formula to find value and add all data without the duplicates

sneakyla

New Member
Joined
Aug 11, 2021
Messages
23
Office Version
  1. 2016
Platform
  1. Windows
Hello,

I need to find the correct formula to find a specific value such and sum all the sizes without any duplicates. Please see below for the table example.

Basically, what I need to achieve is a formula to find BANANA and give a total size number of 3 because banana has small medium and large (3 different sizes), same goes for APPLE with a returning value of 3 because there 3 different sizes for apple too. If I added values of ORANGE with only Small and Medium then I need the formula to return the value of 2 because there are only 2 different sizes.

1629830757132.png


Thank you!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
How about
+Fluff 1.xlsm
ABCD
1
2AXA3
3AX
4AY
5AY
6AZ
7AZ
8AZ
9BX
10BX
11BY
12BX
13BZ
14BZ
15BZ
16BX
Main
Cell Formulas
RangeFormula
D2D2=SUMPRODUCT(--(IF(A2:A20=C2,1/COUNTIFS(A2:A20,C2,B2:B20,B2:B20))))
 
Upvote 0
Solution
How about
+Fluff 1.xlsm
ABCD
1
2AXA3
3AX
4AY
5AY
6AZ
7AZ
8AZ
9BX
10BX
11BY
12BX
13BZ
14BZ
15BZ
16BX
Main
Cell Formulas
RangeFormula
D2D2=SUMPRODUCT(--(IF(A2:A20=C2,1/COUNTIFS(A2:A20,C2,B2:B20,B2:B20))))
Hello!

This one didn't work.
 
Upvote 0
Thanks for that Eric, didn't think it would need it with sumproduct.
 
Upvote 0
It definitely worked with CSE. Thank you so much Eric and Fluff!!
 
Upvote 0
Or
=SUMPRODUCT(--(A2:A20=C2),--(MATCH(B2:B20&"",B2:B20&"",0)=ROW(B2:B20)-ROW(B2)+1))
confirmed with just Enter

M.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,907
Messages
6,122,183
Members
449,071
Latest member
cdnMech

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