Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
kevin
 
Posts: n/a
Default Include several choices in an IF statement.

Once again thanks for your help folks. Could someone show me how to write the
following if statement. =IF(A1=RED OR BLUE OR GREEN OR BLACK OR ORANGE,1,0)
I know these would all need to be in "" but I am not sure what separator to
use.
--
Thanks Kevin
  #2   Report Post  
RagDyer
 
Posts: n/a
Default

Try this:

=IF(OR(A1={"RED","BLUE","GREEN","BLACK","ORANGE"}) ,1,0)

I'm sure you're talking Text here, and *not* the actual colors of the cell.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

"kevin" wrote in message
...
Once again thanks for your help folks. Could someone show me how to write
the
following if statement. =IF(A1=RED OR BLUE OR GREEN OR BLACK OR ORANGE,1,0)
I know these would all need to be in "" but I am not sure what separator to
use.
--
Thanks Kevin

  #3   Report Post  
kevin
 
Posts: n/a
Default

Thanks very much, and yes I was talking about text. Thanks again for your help.
Kevin

"RagDyer" wrote:

Try this:

=IF(OR(A1={"RED","BLUE","GREEN","BLACK","ORANGE"}) ,1,0)

I'm sure you're talking Text here, and *not* the actual colors of the cell.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

"kevin" wrote in message
...
Once again thanks for your help folks. Could someone show me how to write
the
following if statement. =IF(A1=RED OR BLUE OR GREEN OR BLACK OR ORANGE,1,0)
I know these would all need to be in "" but I am not sure what separator to
use.
--
Thanks Kevin


  #4   Report Post  
RagDyer
 
Posts: n/a
Default

Thank you for the feed-back.
--


Regards,

RD
--------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit!
-------------------------------------------------------------------

"kevin" wrote in message
...
Thanks very much, and yes I was talking about text. Thanks again for your
help.
Kevin

"RagDyer" wrote:

Try this:

=IF(OR(A1={"RED","BLUE","GREEN","BLACK","ORANGE"}) ,1,0)

I'm sure you're talking Text here, and *not* the actual colors of the

cell.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

"kevin" wrote in message
...
Once again thanks for your help folks. Could someone show me how to write
the
following if statement. =IF(A1=RED OR BLUE OR GREEN OR BLACK OR

ORANGE,1,0)
I know these would all need to be in "" but I am not sure what separator

to
use.
--
Thanks Kevin



  #5   Report Post  
kevin
 
Posts: n/a
Default

One more complication, when using this formula in say cell d1, and if there
is no value in a1 it returns a 0 in d1, is there a way to include an (ifblank
, return a blank,) statement in the formula so that nothing appears in the
cell until an entry is made in the input cell. Just so that there is not a
long string of 0's.

Thanks Kevin

"RagDyer" wrote:

Try this:

=IF(OR(A1={"RED","BLUE","GREEN","BLACK","ORANGE"}) ,1,0)

I'm sure you're talking Text here, and *not* the actual colors of the cell.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

"kevin" wrote in message
...
Once again thanks for your help folks. Could someone show me how to write
the
following if statement. =IF(A1=RED OR BLUE OR GREEN OR BLACK OR ORANGE,1,0)
I know these would all need to be in "" but I am not sure what separator to
use.
--
Thanks Kevin




  #6   Report Post  
RagDyeR
 
Posts: n/a
Default

Just replace the last 0 in the formula with a null ( "" ).

=IF(OR(A1={"RED","BLUE","GREEN","BLACK","ORANGE"}) ,1,"")
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"kevin" wrote in message
...
One more complication, when using this formula in say cell d1, and if there
is no value in a1 it returns a 0 in d1, is there a way to include an
(ifblank
, return a blank,) statement in the formula so that nothing appears in the
cell until an entry is made in the input cell. Just so that there is not a
long string of 0's.

Thanks Kevin

"RagDyer" wrote:

Try this:

=IF(OR(A1={"RED","BLUE","GREEN","BLACK","ORANGE"}) ,1,0)

I'm sure you're talking Text here, and *not* the actual colors of the

cell.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

"kevin" wrote in message
...
Once again thanks for your help folks. Could someone show me how to write
the
following if statement. =IF(A1=RED OR BLUE OR GREEN OR BLACK OR

ORANGE,1,0)
I know these would all need to be in "" but I am not sure what separator

to
use.
--
Thanks Kevin




  #7   Report Post  
kevin
 
Posts: n/a
Default

Thanks very much RagDyeR.

Kevin

"RagDyeR" wrote:

Just replace the last 0 in the formula with a null ( "" ).

=IF(OR(A1={"RED","BLUE","GREEN","BLACK","ORANGE"}) ,1,"")
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"kevin" wrote in message
...
One more complication, when using this formula in say cell d1, and if there
is no value in a1 it returns a 0 in d1, is there a way to include an
(ifblank
, return a blank,) statement in the formula so that nothing appears in the
cell until an entry is made in the input cell. Just so that there is not a
long string of 0's.

Thanks Kevin

"RagDyer" wrote:

Try this:

=IF(OR(A1={"RED","BLUE","GREEN","BLACK","ORANGE"}) ,1,0)

I'm sure you're talking Text here, and *not* the actual colors of the

cell.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

"kevin" wrote in message
...
Once again thanks for your help folks. Could someone show me how to write
the
following if statement. =IF(A1=RED OR BLUE OR GREEN OR BLACK OR

ORANGE,1,0)
I know these would all need to be in "" but I am not sure what separator

to
use.
--
Thanks Kevin





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
Include Saturday in the WORKDAY function kippi3000 Excel Worksheet Functions 9 December 31st 04 08:21 AM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM
Statement lintan Excel Worksheet Functions 1 December 2nd 04 11:31 PM
Duplicate fields does not match up! If statement Patsy Excel Worksheet Functions 0 November 11th 04 12:16 AM
If statement needed Patsy Excel Worksheet Functions 1 November 4th 04 03:48 PM


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