how do I start a macro using If Then statments

A

acspollock

how do I start a macro using If Then statments

I want to be able to change font colour to amber when difference between
values is less than ten and change it to red if the values are equal or value
2 is greater
 
M

Mike H

Hi,

You can't have an if statement along the lines of

=if(a1>10,this macro,that macro)

but you may be able to do it with worksheet_Change by monitoring the cell
that causes your cell to become >10 but conditional formatting sounds a much
better option.

for example this is a conditional format formula in a1 and looks at a2 and
as soon as A2 is 10+ > than a1 there is a colour change

=$A$2-$A$1>=10

Post an example of what you are trying to achieve and you will get more
precise help

Mike
 
G

Gord Dibben

You don't need a macro.

Use Conditional Formatting.


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top