Top 10 Formula Error If there are Less Than 10 Results
Hi. I am using the following formula to check a box for the top 10 results. However, in some of my Smartsheets there may be only a top 2 or top 7. In those cases I am getting an #INVALID OPERATION error. How can I adjust the formula below so that it doesn't throw an error if there are less than 10 results?
=IF(OR(CountHost@row = LARGE(CountHost:CountHost, 1), CountHost@row = LARGE(CountHost:CountHost, 1), CountHost@row = LARGE(CountHost:CountHost, 2), CountHost@row = LARGE(CountHost:CountHost, 3), CountHost@row = LARGE(CountHost:CountHost, 4), CountHost@row = LARGE(CountHost:CountHost, 5), CountHost@row = LARGE(CountHost:CountHost, 6), CountHost@row = LARGE(CountHost:CountHost, 7), CountHost@row = LARGE(CountHost:CountHost, 8), CountHost@row = LARGE(CountHost:CountHost, 9), CountHost@row = LARGE(CountHost:CountHost, 10)), 1, 0)
Best Answer
-
Try this instead:
=IF(CountHost@row>= LARGE(CountHost:CountHost, MIN(10, COUNTIFS(CountHost:CountHost, @cell <> ""))), 1)
Answers
-
Try this instead:
=IF(CountHost@row>= LARGE(CountHost:CountHost, MIN(10, COUNTIFS(CountHost:CountHost, @cell <> ""))), 1)
-
Works perfectly! Thanks so much @Paul Newcome!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.6K Get Help
- 433 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.9K Ideas & Feature Requests
- 143 Brandfolder
- 147 Just for fun
- 63 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 298 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!