#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 661
Default IF OR Statements

Anybody know how to write a formula for a statement involving "if" and "or"
statements such as:

if (cell x=? and (cell y=? or cell z=?)) then cell Q=? or blank
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,069
Default IF OR Statements

In general terms:
=IF(AND(X=?,OR(Y=?,Z=?)),?,"")
This formula would have to be in cell Q

An example with actual cells:
=IF(AND(A1=10,OR(A2=15,A3=20)),100,"")
This formula must be in the cell to which the result should be returned. A
formula can't "reach out" and put a value in another cell; it just returns a
value to the cell that has the formula.

Please note that a formula can return an empty string "" which makes it
appear empty, but it is not actually blank (it contains the formula).

Hope this helps,

Hutch

"Paul" wrote:

Anybody know how to write a formula for a statement involving "if" and "or"
statements such as:

if (cell x=? and (cell y=? or cell z=?)) then cell Q=? or blank

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 833
Default IF OR Statements

EXCEL 2007

Here is the syntax you requi-

=IF(OR(D5="Finance",D5="Training"),100,20)

You need to adpat the above to your needs.

The above says that if cell D5 is Finance or Training then 100 otherwise 20.

If my comments have helped please hit Yes.

Thanks.



"Paul" wrote:

Anybody know how to write a formula for a statement involving "if" and "or"
statements such as:

if (cell x=? and (cell y=? or cell z=?)) then cell Q=? or blank

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default IF OR Statements

Try this:

=IF(AND(A1=1,OR(A2=2,A3=3)),"Q","")

Next time give proper cell references rather than "cell x".

Hope this helps.

Pete

On May 4, 4:38*pm, Paul wrote:
Anybody know how to write a formula for a statement involving "if" and "or"
statements such as:

if (cell x=? and (cell y=? or cell z=?)) then cell Q=? or blank


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 457
Default IF OR Statements

Example formula:

=IF(AND(A1=2,OR(A2=3,A3=3)),TRUE,FALSE)

The OR and AND function contain their arguements.
--
Best Regards,

Luke M
"Paul" wrote in message
...
Anybody know how to write a formula for a statement involving "if" and
"or"
statements such as:

if (cell x=? and (cell y=? or cell z=?)) then cell Q=? or blank





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 David Excel Worksheet Functions 3 June 25th 08 02:33 AM
If and then statements. KAD Excel Worksheet Functions 4 June 24th 08 09:55 PM
if then statements Mercy Excel Worksheet Functions 2 June 9th 08 12:17 AM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
IF Statements Julie Excel Discussion (Misc queries) 1 May 1st 06 07:45 PM


All times are GMT +1. The time now is 02:16 PM.

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

About Us

"It's about Microsoft Excel"