i don't mess with Excel too much so i'm having an issue with a simple IF() OR statement.
SCENARIO: 4 tanks daily dump chlorine into a water system. Any one or all 4 may dump at any one time. New tank weight is 150. Readings on tank weight are taken daily.
Currently formula is:
"CELL" = 150 means that there's a new tank installed, if the weight is less than 150 then some of the chlorine has been used so give me the amount that has been used.
This appears to work in most contexts. My problem has arisen in the case where a tank is dry and a new one is installed.
The formula should be able to check "CELL" and "CELL+1" to see if the tank has been replaced. i can't get it to work as i expect. Modified formula is:
In either case i get erroneous results. Readings for the affected cells are:
[tt]
G H
20 5 0
21 5 -145
22 150 0
[/tt]
i get the same results for both formulas. Both formulas work up until tanks are changed, then go kaflooey. i know i'm missing something but can't see what.
Thanks,
Dave
SCENARIO: 4 tanks daily dump chlorine into a water system. Any one or all 4 may dump at any one time. New tank weight is 150. Readings on tank weight are taken daily.
Currently formula is:
Code:
If("CELL"<150, SUM("CELL"-"CELL+1"), 0)
This appears to work in most contexts. My problem has arisen in the case where a tank is dry and a new one is installed.
The formula should be able to check "CELL" and "CELL+1" to see if the tank has been replaced. i can't get it to work as i expect. Modified formula is:
Code:
=IF(OR(F21<150,F22<150), SUM(F21-F22), 0)
[tt]
G H
20 5 0
21 5 -145
22 150 0
[/tt]
i get the same results for both formulas. Both formulas work up until tanks are changed, then go kaflooey. i know i'm missing something but can't see what.
Thanks,
Dave