Macro in a formula

  • Thread starter Thread starter paleopc
  • Start date Start date
P

paleopc

Is it possible to run a macro in an IF function formula? e
=If(A1<=5,macro,0). The macro is to insert a background colour in to A
if it is <=5 etc
 
No, and here's why:

http://www.cpearson.com/excel/differen.htm

(see bottom of page)

But you can do conditional formatting. Select A1, go to
Format > Conditional Formatting, and choose "less than or
equal to". In the box, put 5. Now press the "Format"
button and select a color.

HTH
Jason
Atlanta, GA
 
The simple way to acheive yr objective is to use conditional formating
Format->Conditional formating->"Cell value is","less than or equal
to","5"->Format->Patterns->[choose color]->Ok->Ok
Regards
Athiappan
 

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

Back
Top