Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Rumpa Biswas
 
Posts: n/a
Default Can logical operators be used within Conditional Formatting?

My requirement is to use 3 types of output format with 10 possible cell
(input) values.

Example of the problem -

If cell value = "A" OR "B" OR "C", backcolor = Red
If cell value = "D" OR "E" OR "F" OR "G" OR "H" OR "I", backcolor = Green
If cell value = "J" OR "", backcolor = Yellow

I am aware of that VB programming can be done for this.
But I was thinking, if logical operators (e.g., AND, OR) can be used within
a conditional formatting, this problem can be solved very easily. (I tried by
myself, but could work it out.)

If anybody is aware of this, please let me know.

  #2   Report Post  
Posted to microsoft.public.excel.misc
Andrew Taylor
 
Posts: n/a
Default Can logical operators be used within Conditional Formatting?

Change the drop-down from "Cell value is" to "Formula is", and
enter a formula like

=OR(A1="A",A1="B",A1="C")

and similarly for the other two conditions.



Rumpa Biswas wrote:
My requirement is to use 3 types of output format with 10 possible cell
(input) values.

Example of the problem -

If cell value = "A" OR "B" OR "C", backcolor = Red
If cell value = "D" OR "E" OR "F" OR "G" OR "H" OR "I", backcolor = Green
If cell value = "J" OR "", backcolor = Yellow

I am aware of that VB programming can be done for this.
But I was thinking, if logical operators (e.g., AND, OR) can be used within
a conditional formatting, this problem can be solved very easily. (I tried by
myself, but could work it out.)

If anybody is aware of this, please let me know.


  #3   Report Post  
Posted to microsoft.public.excel.misc
Ken Johnson
 
Posts: n/a
Default Can logical operators be used within Conditional Formatting?

Hi Rumpa,
1. select A1 then FormatConditional format....
2. In the Formula Is box type =OR(A1="A", A1="B", A1="C") then set the
red fill format
3.Click Add to goto the second condition
4.In the Formula Is box type =OR(A1="D", A1="E", A1="F", A1="G",
A1="H", A1="I") then set the green fill format.
5.Click Add to go to the third condition
6.In the Formula Is box type =OR(A1="J", A1="", A1="F") then set the
yellow fill format.
7. Click OK then copy the format to cells you want affected.

Ken Johnson

  #4   Report Post  
Posted to microsoft.public.excel.misc
Ken Johnson
 
Posts: n/a
Default Can logical operators be used within Conditional Formatting?

Hi Rumpa,
I'm trying again because nothing seemed to happen last time. If my
previous reply does appear I apologise for appearing repetitive.


1. Select A1 then FormatConditional format....
2. In the Formula Is box type =OR(A1="A", A1="B", A1="C") then set the
red fill format
3. Click Add to goto the second condition
4. In the Formula Is box type =OR(A1="D", A1="E", A1="F", A1="G",
A1="H", A1="I") then set the green fill format.
5. Click Add to go to the third condition
6. In the Formula Is box type =OR(A1="J", A1="", A1="F") then set the
yellow fill format.
7.Click OK then copy the format to cells you want affected.

Ken Johnson

  #5   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier
 
Posts: n/a
Default Can logical operators be used within Conditional Formatting?

Hi

In the Conditional Formatting dialogue, choose Formula is then set first
condition
=A1<"D" and set format to Red
Add
=A1<"J" and set format to Green
add
=A1="J" and set format to Yellow

Change cell reference from A1 to whatever is appropriate

--
Regards

Roger Govier



Rumpa Biswas wrote:
My requirement is to use 3 types of output format with 10 possible
cell (input) values.

Example of the problem -

If cell value = "A" OR "B" OR "C", backcolor = Red
If cell value = "D" OR "E" OR "F" OR "G" OR "H" OR "I", backcolor =
Green
If cell value = "J" OR "", backcolor = Yellow

I am aware of that VB programming can be done for this.
But I was thinking, if logical operators (e.g., AND, OR) can be used
within a conditional formatting, this problem can be solved very
easily. (I tried by myself, but could work it out.)

If anybody is aware of this, please let me know.





  #6   Report Post  
Posted to microsoft.public.excel.misc
Ken Johnson
 
Posts: n/a
Default Can logical operators be used within Conditional Formatting?

Hi Rumpa,
Ignore that ,A1="F" in step 6.
Ken Johnson

  #7   Report Post  
Posted to microsoft.public.excel.misc
Rumpa Biswas
 
Posts: n/a
Default Can logical operators be used within Conditional Formatting?

With formula is, it worked fine. Thanks to everybody.

- Rumpa

"Rumpa Biswas" wrote:

My requirement is to use 3 types of output format with 10 possible cell
(input) values.

Example of the problem -

If cell value = "A" OR "B" OR "C", backcolor = Red
If cell value = "D" OR "E" OR "F" OR "G" OR "H" OR "I", backcolor = Green
If cell value = "J" OR "", backcolor = Yellow

I am aware of that VB programming can be done for this.
But I was thinking, if logical operators (e.g., AND, OR) can be used within
a conditional formatting, this problem can be solved very easily. (I tried by
myself, but could work it out.)

If anybody is aware of this, please let me know.

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 Formatting when inserting a row zahoulik Excel Worksheet Functions 2 January 7th 06 03:01 PM
Conditional Formatting Error ddate Excel Worksheet Functions 0 May 5th 05 09:00 PM
difficulty with conditional formatting Deb Excel Discussion (Misc queries) 0 March 23rd 05 06:13 PM
conditional formatting question Deb Excel Discussion (Misc queries) 0 March 23rd 05 02:07 AM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 03:33 PM


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