Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple (?) IF...OR... Statement

Status
Not open for further replies.

wreded

Technical User
Dec 18, 2001
119
US
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:
Code:
If("CELL"<150, SUM("CELL"-"CELL+1"), 0)
"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:
Code:
=IF(OR(F21<150,F22<150), SUM(F21-F22), 0)
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
 





Hi,

How about this...
[tt]
=SUMIF(F21:F24,"<150")
[/tt]


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Thanks,
i'll give 'er a try.
Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top