Counting Different Cells

jeffmoseler

Well-known Member
Joined
Jul 16, 2004
Messages
540
I need some code or a formula that will take a column of cells and count how many are different. ie:

182
182
170
170
171
152
131

The forumla result will be 5

Thanks for the help.
 

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 another way -- just adjust the range:

=SUMPRODUCT((A1:A50<>"")/COUNTIF(A1:A50,A1:A50&""))

HTH

(Thanks for this one, Aladin! I'm still picking this one apart....)
 
Upvote 0
Thanks for teaching me to fish!

I downloaded those formulas and they worked great. Thanks again.
 
Upvote 0

Forum statistics

Threads
1,213,517
Messages
6,114,085
Members
448,548
Latest member
harryls

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