Count unique text to 1 number

rambostine202

New Member
Joined
Sep 5, 2017
Messages
4
Hello people,

I just gave up on trying to find a formula which I know must be easy.

Here is the data I have (simplified data)
(A, B, C and D are columns and the rows are A2 to A13 but my actual work would be for A2 to A1000 or better yet the whole All A column.

A B
John 1
John 1
Jane 2
Larry 1
John 2
John 4
Eve 1
Jason 5
John 6
Rudolf 2
Rudolf 5
Rudolf 1
Jefferson 8

What I am looking for is a formula that would give me the following in columns C and D:

C D
John 4
Jane 1
Larry 1
Eve 1
Jason 1
Rudolf 3
Jefferson 1

What happened here is:
I want to get the number of times john has come up in the first spreadsheet.
John for example was there 5 times total but the number in D2 should only display 4 because I want to count the unique times John plus the value appear.
For example John had twice "1" , so I don't want to count more than once a name with the same number (i.e since John has two instances where the cell is "1", don't count him twice but just once)

Rudolf for example also shows up 3 times but all the numbers associated to him are unique (i.e in first data set above Rudolf has three instances of showing but no duplicate numbers, so in D7 Rudolf should have an associated number 3 which is the number of distinct values associated to Rudolf.

Hope I gave enough info.

If someone could help me I would very much appreciate it.

Thanks
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
These are array formulas and must be entered with CTRL-SHIFT-ENTER.

If your column B is numeric then the formula in D2, if it's text then the formula in column E in the example below. Drag formula down as needed.
Excel Workbook
ABCDE
1NameDataNameCount
2John1John44
3John1Jane11
4Jane2Larry11
5Larry1Eve11
6John2Jason11
7John4Rudolf33
8Eve1Jefferson11
9Jason5
10John6
11Rudolf2
12Rudolf5
13Rudolf1
14Jefferson8
Sheet
 
Upvote 0
AhoyNC,

I am speechless... This is what I have been fighting with for two days and tried every approach possible. It's perfect. I truly appreciate the help. Now I can finally move on with this thing.

Again thank you so much for this. Thanks for taking the time to help a stranger.

Good day.
 
Upvote 0
You're welcome. Glad to help, thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,341
Members
452,638
Latest member
Oluwabukunmi

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