ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   SIMPLE VBA MACRO FOR CONDITIONAL FORMATTING (https://www.excelbanter.com/excel-discussion-misc-queries/152168-simple-vba-macro-conditional-formatting.html)

FARAZ QURESHI

SIMPLE VBA MACRO FOR CONDITIONAL FORMATTING
 
Can any1 help me simply writing a code to highlight the cell (C5) to Blue if
its value
is not numeric and similarly...

highlight the cell (C6) to Red if its value is numeric but below < 5?

Bob Phillips

SIMPLE VBA MACRO FOR CONDITIONAL FORMATTING
 
You do not need code

Select C5
Menu FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of =NOT(ISNUMBER(C5))
Click the Format button
Select the Pattern Tab
Select Blue
OK
OK

Second condition

Select C6
Menu FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of =AND(ISNUMBER(C6),C6<.5)
Click the Format button
Select the Pattern Tab
Select Red
OK
OK

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"FARAZ QURESHI" wrote in message
...
Can any1 help me simply writing a code to highlight the cell (C5) to Blue
if
its value
is not numeric and similarly...

highlight the cell (C6) to Red if its value is numeric but below < 5?




FARAZ QURESHI

SIMPLE VBA MACRO FOR CONDITIONAL FORMATTING
 
Thanx Bob,

I know how to use Conditional Formatting. The Code required was just for
information.

Please c if u can help me.

Thanx again

"Bob Phillips" wrote:

You do not need code

Select C5
Menu FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of =NOT(ISNUMBER(C5))
Click the Format button
Select the Pattern Tab
Select Blue
OK
OK

Second condition

Select C6
Menu FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of =AND(ISNUMBER(C6),C6<.5)
Click the Format button
Select the Pattern Tab
Select Red
OK
OK

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"FARAZ QURESHI" wrote in message
...
Can any1 help me simply writing a code to highlight the cell (C5) to Blue
if
its value
is not numeric and similarly...

highlight the cell (C6) to Red if its value is numeric but below < 5?





Bob Phillips

SIMPLE VBA MACRO FOR CONDITIONAL FORMATTING
 
Then use the macro recorder.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"FARAZ QURESHI" wrote in message
...
Thanx Bob,

I know how to use Conditional Formatting. The Code required was just for
information.

Please c if u can help me.

Thanx again

"Bob Phillips" wrote:

You do not need code

Select C5
Menu FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of =NOT(ISNUMBER(C5))
Click the Format button
Select the Pattern Tab
Select Blue
OK
OK

Second condition

Select C6
Menu FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of =AND(ISNUMBER(C6),C6<.5)
Click the Format button
Select the Pattern Tab
Select Red
OK
OK

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"FARAZ QURESHI" wrote in message
...
Can any1 help me simply writing a code to highlight the cell (C5) to
Blue
if
its value
is not numeric and similarly...

highlight the cell (C6) to Red if its value is numeric but below < 5?







FARAZ QURESHI

SIMPLE VBA MACRO FOR CONDITIONAL FORMATTING
 
But how would u declare a condition while using a Macro Recorder?

Would oblige if u can write a single piece of code.

"Bob Phillips" wrote:

Then use the macro recorder.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"FARAZ QURESHI" wrote in message
...
Thanx Bob,

I know how to use Conditional Formatting. The Code required was just for
information.

Please c if u can help me.

Thanx again

"Bob Phillips" wrote:

You do not need code

Select C5
Menu FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of =NOT(ISNUMBER(C5))
Click the Format button
Select the Pattern Tab
Select Blue
OK
OK

Second condition

Select C6
Menu FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of =AND(ISNUMBER(C6),C6<.5)
Click the Format button
Select the Pattern Tab
Select Red
OK
OK

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"FARAZ QURESHI" wrote in message
...
Can any1 help me simply writing a code to highlight the cell (C5) to
Blue
if
its value
is not numeric and similarly...

highlight the cell (C6) to Red if its value is numeric but below < 5?








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

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