Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 14
Default how do I write a formula for If And statements ex. if = to ? and

Example if column="red" or column="green","white" otherwise "blue"?

I use If, And but do not get a value. Any help?

=if(AND A1="Red",A1="Green","White","Blue")
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1,173
Default how do I write a formula for If And statements ex. if = to ? and

MacroLearning

if(AND(A1="Red",A1="Green"),"White","Blue")

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"MacroLearning" wrote in message
...
Example if column="red" or column="green","white" otherwise "blue"?

I use If, And but do not get a value. Any help?

=if(AND A1="Red",A1="Green","White","Blue")


  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 14
Default how do I write a formula for If And statements ex. if = to ? a

It seems that it's only reading the last value "blue" not the first -
therefore making them all blue.


"Nick Hodge" wrote:

MacroLearning

if(AND(A1="Red",A1="Green"),"White","Blue")

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"MacroLearning" wrote in message
...
Example if column="red" or column="green","white" otherwise "blue"?

I use If, And but do not get a value. Any help?

=if(AND A1="Red",A1="Green","White","Blue")


  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1,173
Default how do I write a formula for If And statements ex. if = to ? a

Try not to break the threads, I posted in the original...should have been OR
not AND

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"MacroLearning" wrote in message
...
It seems that it's only reading the last value "blue" not the first -
therefore making them all blue.


"Nick Hodge" wrote:

MacroLearning

if(AND(A1="Red",A1="Green"),"White","Blue")

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"MacroLearning" wrote in
message
...
Example if column="red" or column="green","white" otherwise "blue"?

I use If, And but do not get a value. Any help?

=if(AND A1="Red",A1="Green","White","Blue")



  #5   Report Post  
Posted to microsoft.public.excel.newusers
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default how do I write a formula for If And statements ex. if = to ? and

Perhaps this......

IF(OR(A1="Red",A1="Green"),"White","Blue")

Vaya con Dios,
Chuck, CABGx3



"MacroLearning" wrote:

Example if column="red" or column="green","white" otherwise "blue"?

I use If, And but do not get a value. Any help?

=if(AND A1="Red",A1="Green","White","Blue")



  #6   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1,173
Default how do I write a formula for If And statements ex. if = to ? and

Looked past the obvious, just spotted the missing braces. They still apply
but use OR rather than AND if you only want to match either rather than both

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"CLR" wrote in message
...
Perhaps this......

IF(OR(A1="Red",A1="Green"),"White","Blue")

Vaya con Dios,
Chuck, CABGx3



"MacroLearning" wrote:

Example if column="red" or column="green","white" otherwise "blue"?

I use If, And but do not get a value. Any help?

=if(AND A1="Red",A1="Green","White","Blue")


  #7   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 35,218
Default how do I write a formula for If And statements ex. if = to ? and

If there's a chance you have to check more values in A1, you may find this
easier to type:

=IF(OR(A1={"Red","Green"}),"White","Blue")

Just keep adding more "colors" inside those {}'s.



MacroLearning wrote:

Example if column="red" or column="green","white" otherwise "blue"?

I use If, And but do not get a value. Any help?

=if(AND A1="Red",A1="Green","White","Blue")


--

Dave Peterson
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
Fiveif statements in a formula BillS Excel Worksheet Functions 1 July 20th 06 04:43 AM
If, Then statements with a formula Michelle Excel Discussion (Misc queries) 1 January 24th 06 02:04 PM
Can I create a formula with more than 8 IF statements? Paul P Excel Discussion (Misc queries) 2 January 17th 06 12:08 PM
How can I have multiple "If" statements in one formula? MikeL Excel Discussion (Misc queries) 5 January 15th 06 03:36 AM
Formula Help Combing two AND statements Yogi_Bear_79 Excel Worksheet Functions 1 June 7th 05 07:35 PM


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