ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional Formatting (https://www.excelbanter.com/excel-discussion-misc-queries/138082-conditional-formatting.html)

James E Middleton

Conditional Formatting
 
Forgive me if this shows up twice...



I know that there is a limit to 3 conditions, however I was wondering of
there was a way to write a formula for the following:

I have a schedule for classes grades 1,3,&5. Each grade has 4 classes,
A,B,C,D, so a total of 12 classes.

I made a schedule in Excel and I want to color code all the grades
differently, e.g., grade 1 in yellow, 2 in blue, and 5 in green.

In the cells for different periods and different days of the week I've typed
1A, 1B, 1C, 1D, 3A, 3B, etc.

Now when I open Conditional formatting, if I want to use cell is equal to, I
could only format the first three, 1A, 1B, 1C...

Could I write a formula that does the formatting: all cells with the number
1 and a letter are yellow, all cells with the number 3 plus a letter are
blue?

Thanks!



Max

Conditional Formatting
 
Could I write a formula that does the formatting: all cells with the number
1 and a letter are yellow, all cells with the number 3 plus a letter are
blue?


Select col A (A1 active), then apply CF using "Formula is:" as follows

Condition 1,
Formula is:
=AND(LEFT(A1)+0=1,CODE(UPPER(RIGHT(A1)))=65,CODE( UPPER(RIGHT(A1)))<=122)
Format: Yellow

Condition 2,
Formula is:
=AND(LEFT(A1)+0=3,CODE(UPPER(RIGHT(A1)))=65,CODE( UPPER(RIGHT(A1)))<=122)
Format: Blue fill

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


"James E Middleton" wrote:

Forgive me if this shows up twice...



I know that there is a limit to 3 conditions, however I was wondering of
there was a way to write a formula for the following:

I have a schedule for classes grades 1,3,&5. Each grade has 4 classes,
A,B,C,D, so a total of 12 classes.

I made a schedule in Excel and I want to color code all the grades
differently, e.g., grade 1 in yellow, 2 in blue, and 5 in green.

In the cells for different periods and different days of the week I've typed
1A, 1B, 1C, 1D, 3A, 3B, etc.

Now when I open Conditional formatting, if I want to use cell is equal to, I
could only format the first three, 1A, 1B, 1C...

Could I write a formula that does the formatting: all cells with the number
1 and a letter are yellow, all cells with the number 3 plus a letter are
blue?

Thanks!




James E Middleton

Conditional Formatting
 
Thanks, EXACTLY what I wanted!


"Max" wrote in message
...
Could I write a formula that does the formatting: all cells with the
number
1 and a letter are yellow, all cells with the number 3 plus a letter are
blue?


Select col A (A1 active), then apply CF using "Formula is:" as follows

Condition 1,
Formula is:
=AND(LEFT(A1)+0=1,CODE(UPPER(RIGHT(A1)))=65,CODE( UPPER(RIGHT(A1)))<=122)
Format: Yellow

Condition 2,
Formula is:
=AND(LEFT(A1)+0=3,CODE(UPPER(RIGHT(A1)))=65,CODE( UPPER(RIGHT(A1)))<=122)
Format: Blue fill

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


"James E Middleton" wrote:

Forgive me if this shows up twice...



I know that there is a limit to 3 conditions, however I was wondering of
there was a way to write a formula for the following:

I have a schedule for classes grades 1,3,&5. Each grade has 4 classes,
A,B,C,D, so a total of 12 classes.

I made a schedule in Excel and I want to color code all the grades
differently, e.g., grade 1 in yellow, 2 in blue, and 5 in green.

In the cells for different periods and different days of the week I've
typed
1A, 1B, 1C, 1D, 3A, 3B, etc.

Now when I open Conditional formatting, if I want to use cell is equal
to, I
could only format the first three, 1A, 1B, 1C...

Could I write a formula that does the formatting: all cells with the
number
1 and a letter are yellow, all cells with the number 3 plus a letter are
blue?

Thanks!






Max

Conditional Formatting
 
Glad to hear that !
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"James E Middleton" wrote:
Thanks, EXACTLY what I wanted!




All times are GMT +1. The time now is 10:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com