Google-sheets – Spreadsheets: How to only select non-empty cells in function

google sheets

I use this function to find a random content of a cell:

=index(A3:A100, randbetween(1, counta(A3:A100) ) )

Some of the cells in A are empty. How can I change this function so that only those cells considered are not empty?

Best Answer

As far as I know, you can't. You should have an auxiliary column with all values, no blanks, and run it over it.