Replacement for "Distinct"
My store numbers are both numeric and alpha numeric
I am using a COUNT(DISTINCT) formula for the "Store Number" range from the Master sheet
but it returns a "1" is there another formula I should be using?
Best Answer
-
I sure have. The data has to be all the same data type either alpha OR numeric.
Insert a helper column that has a column formula of
=[Store Number]@row + ""
to convert everything to text values. Then use this new column in your cross sheet reference.
Answers
-
Does your cross-sheet range include the entire column? That would be the first thing I check. Distinct shouldn't care whether it's alpha or numeric it should count the distinct number.
-
It does include the entire column.
-
Hmmm. @Andrée Starå @Paul Newcome Ever seen this behavior before?
-
I sure have. The data has to be all the same data type either alpha OR numeric.
Insert a helper column that has a column formula of
=[Store Number]@row + ""
to convert everything to text values. Then use this new column in your cross sheet reference.
-
Here is a link to the DISTINCT function's help page. The note at the bottom indicates that all values must be of the same value type or you may end up with an incorrect count.
-
Thank you for the formula! All good now!
-
Happy to help. 👍️
-
Thanks Paul. I totally missed that note on the Distinct Function page. I actually looked there too.
😑
-
@Mike Wilday No worries. the only reason I remember is because I see it popping up here in the Community at least once every couple of weeks.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!