Which is last item in the list using INDEX?

Hi Team,
i’m using INDEX and
“The first item in the list is 1.”
but the last one?

thks in advance

EX:
INDEX(select(full 1[registre], [_thisrow].[concatenatediaUsuari]=[concatenatediausuari]),1)

0 6 1,179
6 REPLIES 6

Aurelien
Google Developer Expert
Google Developer Expert

Indented:

INDEX(
   select(
        full 1[registre],
       [_thisrow].[concatenatediaUsuari]=[concatenatediausuari])
   ,
1)

My answer, probably something like this:

 INDEX(
    SELECT(
         full 1[registre],
        [_thisrow].[concatenatediaUsuari]=[concatenatediausuari])
    ,
  COUNT(
      SELECT(
         full 1[registre],
        [_thisrow].[concatenatediaUsuari]=[concatenatediausuari])
  )
)

Simplier:

INDEX(
   listName, 
   COUNT(ListName)
)

OK, thanks i know this solution but i thought that perhaps exists a “number” to identify this position.

Unfortunately, no.

In Python the answer would be -1 (negative index goes back and forth), it would be interesting to have this functionality in AppSheets

To get the last value, I'd just use this below:

INDEX(LIST, COUNT(LIST))

Top Labels in this Space