Search code examples
google-sheets

Google Sheets Row Number of last row in a defined table


In Google Sheets, we can define a table (let's call it 'Income' for the sake of the question) and add some data rows to it. In Excel we would use MAX(ROW(Income)) to get the row number of the last row in the table. In Google Sheets, this same formula returns the row number of the first data row. I think it's a difference in how the ROW function handles the output from the Table, but how to get around it is eluding me. I tried wrapping the Table reference in ARRAYFORMULA but that function doesn't like the out put from the Table reference either. Interestingly enough, MIN(ROW(Income)) returns the row number of the first data row, and MIN(ROW(Income[#ALL])) returns the row number of the header row, so it appears that things are a little more different than Google would like us to believe. Suggestions?


Solution

  • You may try:

    =rows(Income)+row(Income[#ALL])
    

    OR

    =rows(Income)+row(Income)-1