COUNTIF - combination of colomns

beman

New Member
Joined
Jan 25, 2017
Messages
8
Hi,

I checked the forum but couldn't find anything that worked for me.

The problem I have is getting excel to count only the unique combination Part and Location, in the example below it should return the number 2 (colomn D) as there are 2 unique locations for the combination.

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]COLOMN A[/TD]
[TD]COLOMN B[/TD]
[TD]COLOMN C[/TD]
[TD]COLOMN D[/TD]
[/TR]
[TR]
[TD]PART[/TD]
[TD]SERIAL[/TD]
[TD]LOCATION[/TD]
[TD]RESULT[/TD]
[/TR]
[TR]
[TD]123456[/TD]
[TD]BS12345[/TD]
[TD]Z.2.J2[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD]123456[/TD]
[TD]BS12346[/TD]
[TD]Z.2.J2[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD]123456[/TD]
[TD]BS12347[/TD]
[TD]Z.2.J2[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD]123456[/TD]
[TD]BS12348[/TD]
[TD]Z.2.J2[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD]123456[/TD]
[TD]BS12349[/TD]
[TD]Z.2.J4[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD]123456[/TD]
[TD]BS12350[/TD]
[TD]Z.2.J4[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD]123456[/TD]
[TD]BS12351[/TD]
[TD]Z.2.J4[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD]123456[/TD]
[TD]BS12352[/TD]
[TD]Z.2.J4[/TD]
[TD="align: center"]2[/TD]
[/TR]
</tbody>[/TABLE]


Hope someones knows how to get this done with light/simple formula.

Thanks in advance for the help!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Try this in D3:

=SUM(SIGN(FREQUENCY(IF($A$3:$A$10=A3,MATCH($C$3:$C$10,$C$3:$C$10,0)),ROW($C$3:$C$10)-ROW($C$3)+1)))

confirm with Control+Shift+Enter after putting the formula in the formula bar.
 
Upvote 0

Forum statistics

Threads
1,226,729
Messages
6,192,695
Members
453,747
Latest member
tylerhyatt04

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