Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Conditional If Statements

Hello--I am a novice with respect to conditional if statements. I
would like to express the following in a formula:

If cell A =5 AND cell B2, return Red
If cell A<=5 AND cell B=0, return Green
If cell A=5 AND cell B=0 OR Cell A<=5 AND cell B=2-5, Return Yellow.

I know this is a lot. What I would like to know is whether it is even
possible to include this many conditions.

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Conditional If Statements

what's wrong with the answer in your other thread?

" wrote:

Hello--I am a novice with respect to conditional if statements. I
would like to express the following in a formula:

If cell A =5 AND cell B2, return Red
If cell A<=5 AND cell B=0, return Green
If cell A=5 AND cell B=0 OR Cell A<=5 AND cell B=2-5, Return Yellow.

I know this is a lot. What I would like to know is whether it is even
possible to include this many conditions.

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 180
Default Conditional If Statements

Hi,

You can have these many conditions.

=IF(AND(A1=5,B12),"RED",IF(AND(A1<=5,B1=0),"GREE N",IF(AND(OR(AND(A1=5,B1=0),A1<=5),B1<=5),"YELLOW ",""))

You may need to twick this as I have not completely tested this. It would
have been a lot easier with some sample data.
HTH,
--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think a post is useful, please rate it as an ANSWER, it will help
others!!


" wrote:

Hello--I am a novice with respect to conditional if statements. I
would like to express the following in a formula:

If cell A =5 AND cell B2, return Red
If cell A<=5 AND cell B=0, return Green
If cell A=5 AND cell B=0 OR Cell A<=5 AND cell B=2-5, Return Yellow.

I know this is a lot. What I would like to know is whether it is even
possible to include this many conditions.

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Conditional If Statements

On Sep 3, 10:54*am, Pranav Vaidya
wrote:
Hi,

You can have these many conditions.

=IF(AND(A1=5,B12),"RED",IF(AND(A1<=5,B1=0),"GREE N",IF(AND(OR(AND(A1=5,B1*=0),A1<=5),B1<=5),"YELLO W",""))

You may need to twick this as I have not completely tested this. It would
have been a lot easier with some sample data.
HTH,
--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think a post is useful, please rate it as an ANSWER, it will help
others!!



" wrote:
Hello--I am a novice with respect to conditional if statements. *I
would like to express the following in a formula:


If cell A =5 AND cell B2, return Red
If cell A<=5 AND cell B=0, return Green
If cell A=5 AND cell B=0 OR Cell A<=5 AND cell B=2-5, Return Yellow.


I know this is a lot. *What I would like to know is whether it is even
possible to include this many conditions.


Thanks!- Hide quoted text -


- Show quoted text -


Hello--thanks so much for your help. I know it would be easier for me
to provide data, but unfortunately the data is confidential. The
formula you provided is working, but is only returing
"Yellow" (although I know that there should be a few reds and greens
as well). Any idea of why this may be?
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Conditional If Statements

On Sep 3, 10:54*am, Pranav Vaidya
wrote:
Hi,

You can have these many conditions.

=IF(AND(A1=5,B12),"RED",IF(AND(A1<=5,B1=0),"GREE N",IF(AND(OR(AND(A1=5,B1*=0),A1<=5),B1<=5),"YELLO W",""))

You may need to twick this as I have not completely tested this. It would
have been a lot easier with some sample data.
HTH,
--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think a post is useful, please rate it as an ANSWER, it will help
others!!



" wrote:
Hello--I am a novice with respect to conditional if statements. *I
would like to express the following in a formula:


If cell A =5 AND cell B2, return Red
If cell A<=5 AND cell B=0, return Green
If cell A=5 AND cell B=0 OR Cell A<=5 AND cell B=2-5, Return Yellow.


I know this is a lot. *What I would like to know is whether it is even
possible to include this many conditions.


Thanks!- Hide quoted text -


- Show quoted text -


Nevermind--I just fixed it! Thanks everyone for the help.


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
Conditional If Statements [email protected] Excel Discussion (Misc queries) 2 September 3rd 08 04:18 PM
Conditional statements Sue Excel Worksheet Functions 1 May 12th 08 10:14 PM
Conditional Statements Help! Brian Excel Discussion (Misc queries) 1 April 8th 08 10:08 PM
Conditional statements james Excel Worksheet Functions 9 January 7th 08 03:07 PM
Conditional Statements Robert Albrecht Excel Discussion (Misc queries) 2 October 3rd 06 08:29 PM


All times are GMT +1. The time now is 03:17 AM.

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"