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.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!