#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sailor
 
Posts: n/a
Default IF function

I want to create an if function that says If cell A, B and C are EACH =0,
then insert the message "green", if the same three cells are EACH less than 0
then insert the message "red", else insert message "yellow"

Any help would be appreciated!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Lotus123
 
Posts: n/a
Default IF function


Here you go...assuming the three cells are in A1, B1, and C1:

=IF(AND(A1=0,B1=0,C1=0),"GREEN",IF(AND(A1<0,B1< 0,C1<0),"RED","YELLOW"))


--
Lotus123
------------------------------------------------------------------------
Lotus123's Profile: http://www.excelforum.com/member.php...o&userid=28611
View this thread: http://www.excelforum.com/showthread...hreadid=487001

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default IF function

=IF(COUNTIF(A2:C2,"=0")=3,"green",IF(COUNTIF(A2:C 2,"<0")=3,"red","yellow"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Sailor" wrote in message
...
I want to create an if function that says If cell A, B and C are EACH =0,
then insert the message "green", if the same three cells are EACH less

than 0
then insert the message "red", else insert message "yellow"

Any help would be appreciated!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sailor
 
Posts: n/a
Default IF function

Lotus123,
You're a peach! This worked beautifully, thanks.
Sailor

"Lotus123" wrote:


Here you go...assuming the three cells are in A1, B1, and C1:

=IF(AND(A1=0,B1=0,C1=0),"GREEN",IF(AND(A1<0,B1< 0,C1<0),"RED","YELLOW"))


--
Lotus123
------------------------------------------------------------------------
Lotus123's Profile: http://www.excelforum.com/member.php...o&userid=28611
View this thread: http://www.excelforum.com/showthread...hreadid=487001


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sailor
 
Posts: n/a
Default IF function

Bob,
Thanks for the reply. Your solution did not work, but I think only because
the cells were not in a consecutive range. Here's another one I got that did
work:

=IF(AND(A1=0,B1=0,C1=0),"GREEN",IF(AND(A1<0,B1< 0,C1<0),"RED","YELLOW"))
Sailor

"Bob Phillips" wrote:

=IF(COUNTIF(A2:C2,"=0")=3,"green",IF(COUNTIF(A2:C 2,"<0")=3,"red","yellow"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Sailor" wrote in message
...
I want to create an if function that says If cell A, B and C are EACH =0,
then insert the message "green", if the same three cells are EACH less

than 0
then insert the message "red", else insert message "yellow"

Any help would be appreciated!






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default IF function

The cells in the one that worked for you are contiguous!

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Sailor" wrote in message
...
Bob,
Thanks for the reply. Your solution did not work, but I think only

because
the cells were not in a consecutive range. Here's another one I got that

did
work:

=IF(AND(A1=0,B1=0,C1=0),"GREEN",IF(AND(A1<0,B1< 0,C1<0),"RED","YELLOW"))
Sailor

"Bob Phillips" wrote:


=IF(COUNTIF(A2:C2,"=0")=3,"green",IF(COUNTIF(A2:C 2,"<0")=3,"red","yellow"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Sailor" wrote in message
...
I want to create an if function that says If cell A, B and C are EACH

=0,
then insert the message "green", if the same three cells are EACH less

than 0
then insert the message "red", else insert message "yellow"

Any help would be appreciated!






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sailor
 
Posts: n/a
Default IF function

I'm sorry Bob, your formula shows the cells as an array. The other one does
not. I probably could have figured our how to change that, however the other
one worked the way it was. Thanks anyway for your help.
Sailor

"Bob Phillips" wrote:

The cells in the one that worked for you are contiguous!

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Sailor" wrote in message
...
Bob,
Thanks for the reply. Your solution did not work, but I think only

because
the cells were not in a consecutive range. Here's another one I got that

did
work:

=IF(AND(A1=0,B1=0,C1=0),"GREEN",IF(AND(A1<0,B1< 0,C1<0),"RED","YELLOW"))
Sailor

"Bob Phillips" wrote:


=IF(COUNTIF(A2:C2,"=0")=3,"green",IF(COUNTIF(A2:C 2,"<0")=3,"red","yellow"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Sailor" wrote in message
...
I want to create an if function that says If cell A, B and C are EACH

=0,
then insert the message "green", if the same three cells are EACH less
than 0
then insert the message "red", else insert message "yellow"

Any help would be appreciated!






  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier
 
Posts: n/a
Default IF function

Hi

Bob's solution will work equally as well as your other solution.
I suggest it didn't work because one is looking at A1:C1 and the other at
A2:C2. Given the same ranges you would get the same outcome.

Regards

Roger Govier


Sailor wrote:
I'm sorry Bob, your formula shows the cells as an array. The other one does
not. I probably could have figured our how to change that, however the other
one worked the way it was. Thanks anyway for your help.
Sailor

"Bob Phillips" wrote:


The cells in the one that worked for you are contiguous!

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Sailor" wrote in message
...

Bob,
Thanks for the reply. Your solution did not work, but I think only


because

the cells were not in a consecutive range. Here's another one I got that


did

work:

=IF(AND(A1=0,B1=0,C1=0),"GREEN",IF(AND(A1<0, B1<0,C1<0),"RED","YELLOW"))
Sailor

"Bob Phillips" wrote:


=IF(COUNTIF(A2:C2,"=0")=3,"green",IF(COUNTIF(A2 :C2,"<0")=3,"red","yellow"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Sailor" wrote in message
...

I want to create an if function that says If cell A, B and C are EACH

=0,

then insert the message "green", if the same three cells are EACH less

than 0

then insert the message "red", else insert message "yellow"

Any help would be appreciated!





  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sailor
 
Posts: n/a
Default IF function

My apologies to Bob. I was in a hurry and when I tried to change the cell
numbers it didn't work. My mistake. Obviously, I'm not an expert in these
things.
Sailor

"Roger Govier" wrote:

Hi

Bob's solution will work equally as well as your other solution.
I suggest it didn't work because one is looking at A1:C1 and the other at
A2:C2. Given the same ranges you would get the same outcome.

Regards

Roger Govier


Sailor wrote:
I'm sorry Bob, your formula shows the cells as an array. The other one does
not. I probably could have figured our how to change that, however the other
one worked the way it was. Thanks anyway for your help.
Sailor

"Bob Phillips" wrote:


The cells in the one that worked for you are contiguous!

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Sailor" wrote in message
...

Bob,
Thanks for the reply. Your solution did not work, but I think only

because

the cells were not in a consecutive range. Here's another one I got that

did

work:

=IF(AND(A1=0,B1=0,C1=0),"GREEN",IF(AND(A1<0, B1<0,C1<0),"RED","YELLOW"))
Sailor

"Bob Phillips" wrote:


=IF(COUNTIF(A2:C2,"=0")=3,"green",IF(COUNTIF(A2 :C2,"<0")=3,"red","yellow"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Sailor" wrote in message
...

I want to create an if function that says If cell A, B and C are EACH

=0,

then insert the message "green", if the same three cells are EACH less

than 0

then insert the message "red", else insert message "yellow"

Any help would be appreciated!






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
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Hyperlinks using R[1]C[1] and offset function in its cell referenc Elijah-Dadda Excel Worksheet Functions 0 March 5th 05 03:31 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM
Find a Function to use accross different worksheets R. Hale Excel Worksheet Functions 3 November 25th 04 07:07 AM


All times are GMT +1. The time now is 08:49 PM.

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"