Formula for multiple distinct values & numbers of those values?

ArPharazon

Board Regular
Joined
May 3, 2004
Messages
51
Office Version
  1. 2016
  2. 2013
  3. 2007
Platform
  1. Windows
I may be explaining this badly, which is probably why I haven't been able to come up with anything on Google for this.

I run a report every day for my job that I'd like to use a formula on that shows each distinct text value from a column and then how many instances of each there are.

At least I hope it can be done with a formula :)

Below is a generic example. What I'd like to end up seeing is: Name1 | 10 / Name2 | 6 / Name3 | 4 and filter out #N/A if possible. The values in this column are all the result of a vlookup.

Excel Distinct Values 8-5-20.jpg
 
I used $K$411:$K411 the first time around but tinkered with it and it's in there now, with the same results.

I get the first "name" that appears in column K and a 3 which should be a 2 (assuming =IF(K412="","",COUNTIF(K:K,K412)) is correct)
 
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Since you're putting the unique list below the source list (which is a bit unusual), you need to change the COUNTIF formula to:

=IF(K412="","",COUNTIF(K$2:K$409,K412))

otherwise it counts the value in the unique list too.
 
Upvote 0
Since you're putting the unique list below the source list (which is a bit unusual), you need to change the COUNTIF formula to:

=IF(K412="","",COUNTIF(K$2:K$409,K412))

otherwise it counts the value in the unique list too.

Gotcha! That one I should've seen. As far as getting all of the names to display instead of just the first one, what am I doing wrong there?

It seems not to like working with =vlookup values, but if I paste the values into another column it appears to work.
 
Upvote 0

Forum statistics

Threads
1,214,938
Messages
6,122,346
Members
449,080
Latest member
Armadillos

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