Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Fred Borden
 
Posts: n/a
Default 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   Report Post  
Jason Morin
 
Posts: n/a
Default

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   Report Post  
JR
 
Posts: n/a
Default

=+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   Report Post  
Fred Borden
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 1 June 6th 05 06:37 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
If formula that looks at multiple cells and values, and then calul Adam Excel Discussion (Misc queries) 1 June 5th 05 11:31 AM
COUNTIF using multiple conditions? Muse of Fire New Users to Excel 3 December 29th 04 08:49 PM
Sum(if ... multiple conditions ... Interpretation? Ken Excel Discussion (Misc queries) 6 December 16th 04 10:23 PM


All times are GMT +1. The time now is 11:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"