Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Adding two if Statements together

If I have two if statement, how do I make it one. For example, I want
to add:

=IF(AND(W2="Open",OR(AE2="CMRA",AE2="MRC-PARTS",AE2="IN-
DIRECT",AE2="DOA",AE2="MRC-PARTS/LABOUR",AE2="REPAIR"),(TODAY()-
D2)=8),"yes","no")

and

=IF(AND(W2="Open",OR(AE2="DIRECT",AE2="IN-DIRECT CONFIG",AE2="DIRECT
TOUCH",AE2="HOSTED"),(TODAY()-D2)=22),"yes","no")

together.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default Adding two if Statements together

Hi

Try
=IF(W2<"open","no",
IF(AND(OR
(AE2="CMRA",AE2="MRC-PARTS",AE2="IN-DIRECT",AE2="DOA",
AE2="MRC-PARTS/LABOUR",AE2="REPAIR"),
TODAY()-D2=8),"yes",
IF(AND(OR
(AE2="DIRECT",AE2="IN-DIRECT CONFIG",AE2="DIRECT TOUCH",
AE2="HOSTED"),TODAY()-D2=22),"yes","no")))

--
Regards

Roger Govier


wrote in message
ups.com...
If I have two if statement, how do I make it one. For example, I want
to add:

=IF(AND(W2="Open",OR(AE2="CMRA",AE2="MRC-PARTS",AE2="IN-
DIRECT",AE2="DOA",AE2="MRC-PARTS/LABOUR",AE2="REPAIR"),(TODAY()-
D2)=8),"yes","no")

and

=IF(AND(W2="Open",OR(AE2="DIRECT",AE2="IN-DIRECT CONFIG",AE2="DIRECT
TOUCH",AE2="HOSTED"),(TODAY()-D2)=22),"yes","no")

together.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 747
Default Adding two if Statements together

My interpretation was that you only need the condition <<< Today() - D2 =8
since it is also satisfied when the condition <<< Today() - D2 =22

is met. You may however want to make it the other way around or another
restriction.

=IF(AND(W2 = "Open", NOT(ISERROR(MATCH(AE2,
{"CMRA","MRC-PARTS","IN-DIRECT","DOA","MRC-PARTS/LABOUR","REPAIR","DIRECT","IN-DIRECT
CONFIG","DIRECT TOUCH","HOSTED"}, 0))), TODAY() - D2 =8), "Yes", "No")

Regards,
Greg

" wrote:

If I have two if statement, how do I make it one. For example, I want
to add:

=IF(AND(W2="Open",OR(AE2="CMRA",AE2="MRC-PARTS",AE2="IN-
DIRECT",AE2="DOA",AE2="MRC-PARTS/LABOUR",AE2="REPAIR"),(TODAY()-
D2)=8),"yes","no")

and

=IF(AND(W2="Open",OR(AE2="DIRECT",AE2="IN-DIRECT CONFIG",AE2="DIRECT
TOUCH",AE2="HOSTED"),(TODAY()-D2)=22),"yes","no")

together.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Adding two if Statements together

Doesn't the 8 condition apply if AE2 is
"CMRA", "MRC-PARTS", "IN-DIRECT", "DOA", "MRC-PARTS/LABOUR", or "REPAIR",
and the 22 condition if AE is
"DIRECT", "IN-DIRECT CONFIG", "DIRECT TOUCH", or "HOSTED", Greg?
--
David Biddulph

"Greg Wilson" wrote in message
...
My interpretation was that you only need the condition <<< Today() - D2
=8
since it is also satisfied when the condition <<< Today() - D2 =22

is met. You may however want to make it the other way around or another
restriction.

=IF(AND(W2 = "Open", NOT(ISERROR(MATCH(AE2,
{"CMRA","MRC-PARTS","IN-DIRECT","DOA","MRC-PARTS/LABOUR","REPAIR","DIRECT","IN-DIRECT
CONFIG","DIRECT TOUCH","HOSTED"}, 0))), TODAY() - D2 =8), "Yes", "No")

Regards,
Greg

" wrote:

If I have two if statement, how do I make it one. For example, I want
to add:

=IF(AND(W2="Open",OR(AE2="CMRA",AE2="MRC-PARTS",AE2="IN-
DIRECT",AE2="DOA",AE2="MRC-PARTS/LABOUR",AE2="REPAIR"),(TODAY()-
D2)=8),"yes","no")

and

=IF(AND(W2="Open",OR(AE2="DIRECT",AE2="IN-DIRECT CONFIG",AE2="DIRECT
TOUCH",AE2="HOSTED"),(TODAY()-D2)=22),"yes","no")

together.




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 747
Default Adding two if Statements together

David,

It's a matter of interpretation and judgement as to what you think the OP
most likely wants. The formulae seem to imply the OP is from the auto service
industry and therefore may not have any experience with Excel, and so may
have difficulty simply blending the two. I don't get the impression the OP is
the author of the formulae.

If the OP wanted an If / ElseIf structure I figured would have said
something about structure. All the OP said was:
If I have two if statement, how do I make it one.

Then says to add formula1 and formula2 together.

The first formula implies if W2 = "Open" and AE2 is equal to one of the
items in the first list and its a week or more old then return "yes" else
return "no". The second implies if W2 = "Open" and AE2 is equal to one of the
items in the second list and it's 3 weeks or more old then return "yes" else
return "no". In the auto service industry, I don't see the relavence of such
an If / ElseIf conditional setup. I was expecting feedback from the OP to
sort it out.

Regards,
Greg


"David Biddulph" wrote:

Doesn't the 8 condition apply if AE2 is
"CMRA", "MRC-PARTS", "IN-DIRECT", "DOA", "MRC-PARTS/LABOUR", or "REPAIR",
and the 22 condition if AE is
"DIRECT", "IN-DIRECT CONFIG", "DIRECT TOUCH", or "HOSTED", Greg?
--
David Biddulph

"Greg Wilson" wrote in message
...
My interpretation was that you only need the condition <<< Today() - D2
=8
since it is also satisfied when the condition <<< Today() - D2 =22

is met. You may however want to make it the other way around or another
restriction.

=IF(AND(W2 = "Open", NOT(ISERROR(MATCH(AE2,
{"CMRA","MRC-PARTS","IN-DIRECT","DOA","MRC-PARTS/LABOUR","REPAIR","DIRECT","IN-DIRECT
CONFIG","DIRECT TOUCH","HOSTED"}, 0))), TODAY() - D2 =8), "Yes", "No")

Regards,
Greg

" wrote:

If I have two if statement, how do I make it one. For example, I want
to add:

=IF(AND(W2="Open",OR(AE2="CMRA",AE2="MRC-PARTS",AE2="IN-
DIRECT",AE2="DOA",AE2="MRC-PARTS/LABOUR",AE2="REPAIR"),(TODAY()-
D2)=8),"yes","no")

and

=IF(AND(W2="Open",OR(AE2="DIRECT",AE2="IN-DIRECT CONFIG",AE2="DIRECT
TOUCH",AE2="HOSTED"),(TODAY()-D2)=22),"yes","no")

together.





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
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
if statements qwerty_2006 Excel Worksheet Functions 3 March 12th 06 08:09 AM
Adding to IF statements Dubbs Excel Discussion (Misc queries) 6 July 6th 05 05:30 PM
Excel adding to IF statements together Dubbs Excel Discussion (Misc queries) 3 June 15th 05 06:45 PM
adding color to the results of IF statements Mark Excel Worksheet Functions 2 April 28th 05 07:29 PM


All times are GMT +1. The time now is 12:43 AM.

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"