# Libreoffice Calc: track minimum of two cells

I have a cell whose value changes every 5 minutes A1.
In A2 I can track the High value with =MAX(A1,A2)
In A3 I want to track the low value so I tried =MIN(A1,A3) but it always goes to zero
Any ideas on how can i get this to work?
My goal is to be able to see 3 values Current,High, and Low at any time during the day (stock spreadsheet)

I think you would need to start with a number in A3 or it will always be zero. MIN(A1,A3) picks the lower number so if A3 starts with zero or null, it will never change unless A1 has a negative number.

Thanks for responding. Yeh, I’ve tried that, it just changes to zero when i hit enter when entering the MIN formula

I can’t get your =Max(a1,a2) to work, I get err522, but if somehow it’s working for you, wouldn’t a3’s formula be =max(a1,a2) also?

Here is a sample spreadsheet illustrating the problem
http://nisquallyhighlands.net/Sample.ods

My last response had a typo - ‘max’ instead of ‘min’ but that doesn’t work as you’ve no doubt found out. You need an 'if() formula around the ‘min()’ to get it started but I haven’t worked out exactly how. If you can, I’d be interested to see how.

I don’t know if you’ve got it yet but this works

=if(a3=0,a1,min(a1,a3))
in a3.

Thanks Pete, I’ve been testing your suggestion and it works great!

OK. Glad to be able to help.