Forum Discussion

billyrichrich83's avatar
billyrichrich83
Copper Contributor
Oct 24, 2023
Solved

Find latest iteration of reference number

Hi all,    Hoping you can help.    I have a spreadsheet that tracks document reviews. I have been asked if there is a way we can track the documents that have had an initial review and then sent ...
  • PeterBartholomew1's avatar
    Oct 24, 2023

    billyrichrich83 

    Can you rely upon the Iteration numbers being in increasing order down the sheet?  If so, you can search for the final occurrence of each DRN and return the corresponding Category.  I normally use a dynamic array to produce the results for the each record but, since you are using a table, the formula could be placed in the first record and it will propagate down the table.

    = LET(
        category, XLOOKUP([@[DRN Number]], [DRN Number], [DRN Category],,,-1),
        IF(category=1, "closed", "accepted")
      )

    See the right-most field.  If you have to check the order of the Iteration numbers, the formula would get more complicated.

    BTW, it is best practice when using Tables not to allow empty records within the list or at the end of the table.  The Table should grow automatically as data is added.

     

Resources