Need count of distinct values in multi-column range

billmarshall

New Member
Joined
Oct 31, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
I am trying to get a distinct count from a multi-column range. I've tried the UNIQUE formula in many permutations (with COUNTA), and it is not giving me the right answer. The multi-column range example here is 50 total values, with 37 distinct values. So 37 is the answer I'd expect. I've also tried this formula : =SUM(IF(COUNTIF(G2:K11,G2:K11)=1,1,0)) but it's giving me an answer of 26, which is not correct.

Any help would be greatly appreciated. Thanks!
 

Attachments

  • Screenshot 2022-10-31 103012.jpg
    Screenshot 2022-10-31 103012.jpg
    66.1 KB · Views: 11

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Here's my version : Microsoft® Excel® for Microsoft 365 MSO (Version 2210 Build 16.0.15726.20070) 64-bit
 
Upvote 0
Ok, thanks for that, how about
Excel Formula:
=ROWS(UNIQUE(TOCOL(G2:K11,1)))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,459
Messages
6,124,944
Members
449,198
Latest member
MhammadishaqKhan

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