Macro in a formula

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
 
J

Jason Morin

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
 
S

Selvan

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
 
Top