How to count unique records in a column?

Rev12

New Member
Joined
Jun 17, 2018
Messages
3
Hi!

I need a help of counting unique records as example below

Column A
HP-S30-A-01-001
HP-S30-A-01-001
HP-S30-A-01-001
HP-S30-A-01-001
HP-S30-MP-05-001
HP-S30-MP-05-001
HP-S30-MB-07-012
HP-S30-MB-07-012
HP-S30-MB-07-012
HP-S30-MB-07-012

I need the result as below

Column A Column B
HP-S30-A-01-001 1
HP-S30-A-01-001
HP-S30-A-01-001
HP-S30-A-01-001
HP-S30-MP-05-001 1
HP-S30-MP-05-001
HP-S30-MB-07-012 1
HP-S30-MB-07-012
HP-S30-MB-07-012
HP-S30-MB-07-012


Any help is really appreciated.

Thanks in advance.
Rev12
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Assuming your values start in row 1, if your values in column A are always sorted, you can place 1 in cell B1, and then this formula in cell B2 and copy down for all rows:
Code:
=IF(A2=A1,"",1)
 
Upvote 0
Hi!

I need a help of counting unique records as example below

Column A
HP-S30-A-01-001
HP-S30-A-01-001
HP-S30-A-01-001
HP-S30-A-01-001
HP-S30-MP-05-001
HP-S30-MP-05-001
HP-S30-MB-07-012
HP-S30-MB-07-012
HP-S30-MB-07-012
HP-S30-MB-07-012

I need the result as below

Column A Column B
HP-S30-A-01-001 1
HP-S30-A-01-001
HP-S30-A-01-001
HP-S30-A-01-001
HP-S30-MP-05-001 1
HP-S30-MP-05-001
HP-S30-MB-07-012 1
HP-S30-MB-07-012
HP-S30-MB-07-012
HP-S30-MB-07-012


Any help is really appreciated.

Thanks in advance.
Rev12


What I really need is to count unique records, for example

in Column A5:A11

HP-S30-A-01-001
HP-S30-A-01-001
HP-S30-A-01-001
HP-S30-A-01-001
HP-S30-MP-05-001
HP-S30-MP-05-001

I need a result in B5:B11 that would count as 1 even it's a duplicated as below

Column A5:A11 B5:B11
HP-S30-A-01-001 1
HP-S30-A-01-001
HP-S30-A-01-001
HP-S30-A-01-001
HP-S30-MP-05-001 1
HP-S30-MP-05-001


thanks in advance for any help.

Rev12
 
Upvote 0
I need a result in B5:B11 that would count as 1 even it's a duplicated as below
That is exactly what the formula I gave you should do. Did you try it?
Just adjust it for your range by placing this formula in B5 and copy down.
Code:
=IF(B5=B4,"",1)
If you do that, it should look EXACTLY like the desired output you show.
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,809
Members
449,048
Latest member
greyangel23

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