# Top 10 Formula Error If there are Less Than 10 Results

Options
✭✭✭

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)

• ✭✭✭✭✭✭
Options

=IF(CountHost@row>= LARGE(CountHost:CountHost, MIN(10, COUNTIFS(CountHost:CountHost, @cell <> ""))), 1)

• ✭✭✭✭✭✭
Options

=IF(CountHost@row>= LARGE(CountHost:CountHost, MIN(10, COUNTIFS(CountHost:CountHost, @cell <> ""))), 1)

• ✭✭✭
Options

Works perfectly! Thanks so much @Paul Newcome!

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!