ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Condition BLUE (https://www.excelbanter.com/excel-discussion-misc-queries/245869-condition-blue.html)

Paul Black

Condition BLUE
 
Good afternoon everyone,

I have a column of figures such as ...

0
0+
1
1+
2
2+

3
3+
4
4+
5
5+
6
6+

.... and I would like to conditionally format them RED for 0 to 2+ and
BLUE for 3 to 6+ please.
I used a formula to calculate these and then concatenate to get the +.

Thanks in advance,
Paul

Dave Peterson

Condition BLUE
 
First, I think I would use two separate columns--one for the number and one for
the +.

But you can try this:
Select your range (I used A1:a15) and with A1 the activecell:
Format|Conditional formatting
Formula is:
=AND(--(SUBSTITUTE(A1,"+",""))=0,--(SUBSTITUTE(A1,"+",""))<3)
(and give it a blue format)

And add another formula:
=AND(--(SUBSTITUTE(A1,"+",""))=3,--(SUBSTITUTE(A1,"+",""))<7)
(and format it red)

The =substitute() replaces the + with "" (nothing) and the -- converts the text
(it's a string) to a real number.


Paul Black wrote:

Good afternoon everyone,

I have a column of figures such as ...

0
0+
1
1+
2
2+

3
3+
4
4+
5
5+
6
6+

... and I would like to conditionally format them RED for 0 to 2+ and
BLUE for 3 to 6+ please.
I used a formula to calculate these and then concatenate to get the +.

Thanks in advance,
Paul


--

Dave Peterson


All times are GMT +1. The time now is 04:08 AM.

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