Google-sheets – Google Sheets get row number of visible row

google sheets

I want to get the row number of the first visible row on one of my sheets. So for example if rows 1 – 499 were hidden then I want to write a formula that returns the numerical value 500.

I know this will probably require the usage of the ROW function but I'm not sure how to write the required condition.

Best Answer

  1. Let's assume your data is in column A
  2. Create a new column B and write =row() into every cell of that column, so it will contain the row number
  3. Use the following formula to calculate what you need:

    =subtotal(105,B:B)
    

It works like these: subtotal(105,range) shows you the minimum value of the range that is not hidden.