@gfc The comment you added to your quesiton:

A1 changes periodically and can go up or down. I want to capture the max value of A1 in A2 whenever A1 exceeds A2.

made me thinking and I can imagine 3 situations:

(As you compare a1 and a2, I assume you have your figures in row 1 and row 2)

- You want to compare the values in row 1 with a single value in row 2.
- You want to detect the maximum value of row 1 for each period during which the values increase, decreases, increases....
- You have a 2 rows of figures and you want to replace the values in row 2 with the values of row 1 whenever the the values in in cell of row 1 is greater than the value of the cell being just below of the figures, you want to replace the figure in row 2 with the figure of row 1.

If 1, then the answer by qubit is perfectly fine and in row 2 you will find the answer

If 2, the situation is a bit more complex and I would need to see you figures to get an idea what could be done.

If 3, you can apply the logic of qubit and have your formula in row 3

A1 changes periodically and can go up or down. I want to capture the max value of A1 in A2 whenever A1 exceeds A2. This is a circular reference problem rather than a recursive problem.