Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Test of Multiple Conditions in an IF statement

What is the correct format to test for multiple conditions in an IF
statement? I want to test if both of two conditions are correct.

The format I am using is =IF((D1415) AND (G14="Y") . . .) but Excel won't
accept that saying that the "logical test" is invalid. Both cells being
tested do exist.

Any ideas?
--
jws21
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: Test of Multiple Conditions in an IF statement

Hi jws21,

To test for multiple conditions in an IF statement, you can use the AND or OR function. The correct format for testing if both of two conditions are correct using the AND function is:
  1. =IF(AND(D1415,G14="Y"), value_if_true, value_if_false)

In this formula, the AND function is used to test if both conditions are true. If both conditions are true, the formula will return the value_if_true result. If either condition is false, the formula will return the value_if_false result.

Make sure to replace "value_if_true" and "value_if_false" with the appropriate values or formulas for your specific situation.

Best regards,
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Test of Multiple Conditions in an IF statement

Go to the help index and take a look at
AND
for the proper syntax

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Joe" (donotspam) wrote in message
...
What is the correct format to test for multiple conditions in an IF
statement? I want to test if both of two conditions are correct.

The format I am using is =IF((D1415) AND (G14="Y") . . .) but Excel won't
accept that saying that the "logical test" is invalid. Both cells being
tested do exist.

Any ideas?
--
jws21


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Test of Multiple Conditions in an IF statement

You've posted this question several times now, Joe. Try reading some of the
responses.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Joe" wrote:

What is the correct format to test for multiple conditions in an IF
statement? I want to test if both of two conditions are correct.

The format I am using is =IF((D1415) AND (G14="Y") . . .) but Excel won't
accept that saying that the "logical test" is invalid. Both cells being
tested do exist.

Any ideas?
--
jws21

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Test of Multiple Conditions in an IF statement

Hi,

=IF(AND(A1=1,B1="Red"),True,False)
or
=IF(OR(A1=1,B1="Red"),True,False)

You can have up to 30 tests inside the AND or OR in 2003.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Joe" wrote:

What is the correct format to test for multiple conditions in an IF
statement? I want to test if both of two conditions are correct.

The format I am using is =IF((D1415) AND (G14="Y") . . .) but Excel won't
accept that saying that the "logical test" is invalid. Both cells being
tested do exist.

Any ideas?
--
jws21

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-Then statement with multiple conditions Merlin Excel Discussion (Misc queries) 2 December 1st 08 11:53 PM
a countif statement with multiple conditions perfect_one1 Excel Discussion (Misc queries) 1 October 30th 08 11:08 PM
Need help with If-then statement with multiple conditions Julie Excel Worksheet Functions 7 May 28th 08 09:15 AM
IF Statement with multiple conditions Ladypep Excel Discussion (Misc queries) 3 April 5th 06 02:44 PM
If statement using multiple conditions SCOOBYDOO Excel Worksheet Functions 1 June 6th 05 12:45 PM


All times are GMT +1. The time now is 12:57 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"