A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Using the "if" function, the "and" function and the "or" function



 
 
Thread Tools Display Modes
  #1  
Old February 28th, 2010, 12:56 AM posted to microsoft.public.excel.newusers
Superblonde64
external usenet poster
 
Posts: 2
Default Using the "if" function, the "and" function and the "or" function

I am not sure if or how to use all three in a formula. For example:

=if(b2="red", and c3="blue", d6="green")

if that makes sense at all.
  #2  
Old February 28th, 2010, 02:13 AM posted to microsoft.public.excel.newusers
Dave Peterson
external usenet poster
 
Posts: 19,791
Default Using the "if" function, the "and" function and the "or" function

Maybe something like:

=if(and(b2="red",c3="blue",d6="green"),"all three match!","not all 3 match")

or

=if(or(b2="red",c3="blue",d6="green"),"at least one matches","none match")

or you can use both to make the criteria more complex

=if(and(b2="red",or(c3="blue",d6="green")),then,el se)
B2 has to be red and either (or both) c3=blue or d6=green
for the "then" portion to be returned.
anything else, and you get the else portion.



Superblonde64 wrote:

I am not sure if or how to use all three in a formula. For example:

=if(b2="red", and c3="blue", d6="green")

if that makes sense at all.


--

Dave Peterson
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:54 PM.


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