I am trying to find the closest matching row that is above my searching row.
If Smartsheet does not allow searching backwards (above the current row) is there a way to search downwards, where the closest matching criteria to the searching row is displayed like the formula below is attempting to do?
The following provides an example of what I am trying to do:
If dollars in PM Final Revenue column, copy value to 2501_January and no need to search. Else. search upwards from the current row (call it Row Z) and find the closet matching row (call it Row D) with a JO #, FC Month and look for data in the 2501_January column. If no match found in all the rows above it, let Row Z's 2501_January column remain blank. Else, display the Row D's column 2501_January data into Row Z's 2501_January column.
In this case for Row Z, Row A , Row G and Row C are bypassed. I only want the value directly above the searching row. The following formula was written to perform this action. Unfortunately as it searches from the Parent row down the child rows, it displays the first match instead of looking further for the closet row's matching data. The formula is placed in the 2501_January column. This is why I have a helper column that is an exact match of the 2501_January column so I don't get a Circular Reference error.
=IF([FC Month]@row = "2501_January", [PM Final Revenue]@row , IF(COUNT(CHILDREN()) > 0, "", IFERROR(INDEX(COLLECT([2501_January_Helper]:[2501_January_Helper], [JO #]:[JO #], [JO #]@row , Month:Month, 1), 1), "")))
There's a Month column that is also also looked at. I didn't include it in my screen shot. Its just the corresponding month number to January, i.e., 1.