Want Libre office to leave a cell alone - see below

Hello

I have a working formula which picks up info off sheet1 and places it into the cells on sheet2 “on date”, thus:

=IF($‘sheet 1’.H3=“5”,$‘sheet 2’.H31,“0”) {H3 on sheet 1 is a date field}

=IF($‘sheet 1’.H3=“6”,$‘sheet 2’.H31,“0”)

etc

as you can see the last command in the formula reads “0”. This puts a zero into the field if the date in “H3” on sheet 1 has changed, (a return on the formula of FALSE). Problem is that on date “5” all is good (assuming that IS the date), however on date “6” the formula puts a zero into the field on cell for date “5”. What we need is for the info which is already on the form (say in date '5" to stay UNchanged on the following day.

So the formula writes info to the cell in sheet 2 on date 5 - all good
but on date 6 I want the info which was written to the previous cell the previous day to stay UNchanged. So instead of “0” I want NO change to happen to the PREVIOUS days info.

Phew ! Any ideas appreciated !

I feel I don’t understand your problem but like to give you a hint based on the formulas you listed.

=IF($'sheet 1'.H3="5",$'sheet 2'.H31,"0")

Loc = the cell in which the above formula is located:

If H3 of sheet 1 = 5 then Loc is H31 of sheet 2, if not Loc is 0.

Should this not help you, please write down your thoughts/logic in the same way to enable help.

thanks I have figured it out

thanks but I have figured it out and no macro needed.

heres how:

=IF($‘sheet 1’.H3=“6”,$‘sheet 2’.H31,A8)
=IF($‘sheet 1’.H3=“7”,$‘sheet 2’.H31,A9)
=IF($‘sheet 1’.H3=“8”,$‘sheet 2’.H31,A10)

etc

had to allow ‘iterations’ also so it could do 'circular references

(edit: fixed lack of newlines)

sorry the page has stuffed up my formatting a bit

sorry the page has stuffed up my formatting a bit