formula for counting unique record

polska2180

Active Member
Joined
Oct 1, 2004
Messages
357
Office Version
  1. 365
Okay, I haven't been able to find this anywhere but I need a formula to count unique records....kinda like with you do a adv. filter and do unique records. But reather then me doing it on every sheet I have I would like a formula. The row I interested is filled with account numbers so:

12324
12324
12554
35758
35412
35412

So this would give a total of 4 unique records....thanks for any help.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
polska2180 said:
Okay, I haven't been able to find this anywhere but I need a formula to count unique records....kinda like with you do a adv. filter and do unique records. But reather then me doing it on every sheet I have I would like a formula. The row I interested is filled with account numbers so:

12324
12324
12554
35758
35412
35412

So this would give a total of 4 unique records....thanks for any help.

One of:

1]

=SUM(IF(A2:A7<>"",1/COUNTIF(A2:A7,A2:A7)))

which needs to be confirmed with control+shift+enter.

2]

=SUMPRODUCT((A2:A7<>"")/COUNTIF(A2:A7,A2:A7))

3] If A2:A7 is numeric...

=SUM(IF(FREQUENCY(A2:A7,A2:A7)>0,1))
 

Forum statistics

Threads
1,147,694
Messages
5,742,671
Members
423,746
Latest member
Joaogomes

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
Top