Next to last row.


im trying to collect the data (Next To Last Row) in a table with multiple rows that fills up every day. 

Example of a two column table

ID ....... NAME
1 ......... Jhon
2 ......... Dennis
3 ......... Sara
4 ......... James    <----- This is the row i want to collect.
5 ......... Jessica

So normally when getting data i tend to mostly use @A:A  or @B:B and then select Agregated value and select "LAST"
But to compare i more then often want to compare it to the "NEXT TO LAST VALUE"  and in the example above this would mean ID 4. But as the table fills up with new rows everyday its not possible to use the @A4 variable.  

so does anyone know the variable to get data from a table and only collect the "Next To Last Row" ?

Thank you.



  • Avatar
    Parker Selman Official comment

    Hi there,

    Thanks for the post! 

    You can accomplish this using the SLICE and COUNT functions. Specifically, in a format like this:

    SLICE(@A:A, COUNT(@A:A) - 2 , COUNT(@A:A) - 1 )

    This formula will return values for column A only for values after the 3rd to last entry and before the last entry, meaning this will return the 2nd to last value. 

    I hope this helps! 


  • 0
    Rickard rickard

    Hello thank you for fast reply.

    i tried this but it ended up with an error.

  • 0
    Parker Selman

    Hi there, 

    For each of those red highlighted data references, you can click on column A in your data to replace the erroneous data reference with a reference to your column. That should eliminate this error. 



Please sign in to leave a comment.