Hi all!
I'm working on a column formula that will check whether the Column2ref cell in the current row is blank. If it is blank, the formula finds the maximum value in the ID column where the Trainer Name matches the Trainer Name cell value in the current row and the ID cell value is less than the ID cell value in the current row, then returns the corresponding Column2ref cell value for that maximum ID. If the Column2ref cell in the current row is not blank, the formula returns the Column2ref cell value in the current row.
My current formula is executing this perfectly, but I need to adapt it so that if the matched Column2ref cell is empty, the formula will continue searching for the next highest value in the ID column (while still matching the Trainer Name). It should keep searching until it finds the highest ID column cell value where the Trainer Name matches the Trainer Name in the current row and the Column2ref cell is not empty, then it should pull that identified Column2ref value into the formula column in the current row.
This is my current formula: =IF(ISBLANK([Column2ref]@row), INDEX(COLLECT([Column2ref]:[Column2ref], [Trainer Name]:[Trainer Name], [Trainer Name]@row, ID:ID, MAX(COLLECT(ID:ID, [Trainer Name]:[Trainer Name], [Trainer Name]@row, ID:ID, <ID@row))), 1), [Column2ref]@row)
And here is a screenshot of the sheet I am working with:
Thanks so much!