Count the number of unique Values in a column

O177812

Board Regular
Joined
Apr 16, 2015
Messages
82
Office Version
  1. 365
  2. 2021
Hi, I am trying to count the number of unique values in a column:

When I use this: =SUMPRODUCT(1/COUNTIF(I2:I103,I2:I103))
It works perfectly.

The only issue is that the total number of rows is dynamic and when tried this: =SUMPRODUCT(1/COUNTIF("I2:I"&MAX((I:I<>"")*(ROW(I:I))),"I2:I"&MAX((I:I<>"")*(ROW(I:I)))))

I received an error :(

This formula: MAX((I:I<>"")*(ROW(I:BI))) returns the correct value of "103" I just don't know how to insert it into my initial formula.

Any help would be greatly appreciated.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
How about
Excel Formula:
=ROWS(UNIQUE(FILTER(I2:I10000,I2:I10000<>"")))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,456
Messages
6,124,939
Members
449,197
Latest member
k_bs

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