Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How do I set up a formula with multiple conditions?
I need to know how to develop a formula that will look at "x" "y" and see if
either is between both "a" and "b" ie.: x=d2 y=d6 a=a12 b=b12 If(d2a12 and d6<b12,d6-d2,0) |
#2
|
|||
|
|||
This formula tests D2 first, then D6. So even if D6 satisfies both
conditions, it will still read "D2 is between both" if D2 satisfies both conditions: =IF(AND(D2A12,D2<B12),"D2 is between both",IF(AND(D6A12,D6<B12),"D6 is between both","Both tests failed")) Or maybe you're looking for something like: =IF(OR(AND(D2A12,D2<B12),AND(D6A12,D6<B12)),"D2 and/or D6 are between both","D2 and D6 both failed") HTH Jason Atlanta, GA "Fred Borden" wrote: I need to know how to develop a formula that will look at "x" "y" and see if either is between both "a" and "b" ie.: x=d2 y=d6 a=a12 b=b12 If(d2a12 and d6<b12,d6-d2,0) |
#3
|
|||
|
|||
=+IF(D2A12,IF(D2<B12,IF(D6A12,IF(D6<B12,C1-B1,0))))
Fred: This will work. It's called an embedded if statement. You a just using four ifs all together. Just remember for every open parenthesis, you must have a close parenthesis. "Fred Borden" wrote: I need to know how to develop a formula that will look at "x" "y" and see if either is between both "a" and "b" ie.: x=d2 y=d6 a=a12 b=b12 If(d2a12 and d6<b12,d6-d2,0) |
#4
|
|||
|
|||
Jason, thanks for your help!
"Jason Morin" wrote: This formula tests D2 first, then D6. So even if D6 satisfies both conditions, it will still read "D2 is between both" if D2 satisfies both conditions: =IF(AND(D2A12,D2<B12),"D2 is between both",IF(AND(D6A12,D6<B12),"D6 is between both","Both tests failed")) Or maybe you're looking for something like: =IF(OR(AND(D2A12,D2<B12),AND(D6A12,D6<B12)),"D2 and/or D6 are between both","D2 and D6 both failed") HTH Jason Atlanta, GA "Fred Borden" wrote: I need to know how to develop a formula that will look at "x" "y" and see if either is between both "a" and "b" ie.: x=d2 y=d6 a=a12 b=b12 If(d2a12 and d6<b12,d6-d2,0) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formula checking multiple worksheets | Excel Worksheet Functions | |||
Formula checking multiple worksheets | Excel Worksheet Functions | |||
If formula that looks at multiple cells and values, and then calul | Excel Discussion (Misc queries) | |||
COUNTIF using multiple conditions? | New Users to Excel | |||
Sum(if ... multiple conditions ... Interpretation? | Excel Discussion (Misc queries) |