Google Sheet: How to replace Cell-A with number in Cell-B if the number input is lower than original Cell-B?

143 Views Asked by At

I am trying to find the lowest value of cell B1 that is constantly being updated. If B1 is lower than A1, then A1 will be replaced with a new B1 value. And if B1 is higher than A1, then A1 retain its previous updated number. I am not sure if this can be done with function, script, or if it's even possible to do.

I have this in Cell A1 "=if(A1<B1,B1,A1)"

It's giving me error and I am guessing it's because the "value_if_false" is pointing to the cell I put the IF statement in, thus creating an infinite loop.

1

There are 1 best solutions below

1
pnuts On

Please try in A1:

=if(A1>B1,B1,A1)

and turn on iterative calculation (which I would not normally recommend). Max. of 1 should be adequate.