Any other way to trigger a macro?

L

Leon

I read previous posts about not being able to trigger a macro through a
function. So my question is: Is there any way to have the macro see
that the IF function is at "true", or false"?

What i am doing is i have an nested if function that says wheather a
person's rent is due today, due soon, is late, or is good. My macro
changes the sheet tab color to red. Now what i need is for the sheet
tab color to be red if the rent is due.

What would be ideal is if it was orange if its due within 30 days and
then bright red if its due or late and white if it is good.

Anyone have any ideas or tips on how i can accomplish this goal?

This is my nested IF function:

"=IF($I$24=TODAY(),"Due",IF($I$24<TODAY(),"Overdue",IF($I$24<NOW()+30,"Lease
is ending","OK")))"

And my macro right now i just recorded to change the sheet tab to red.

Any tips will be extremely appreciated. Thank you for your time and
help.

Sincerely,
Leon
 
T

Tushar Mehta

Consider adding the code to the worksheet's Calculate event procedure
(or maybe better yet the workbook's or application's SheetCalculate
event procedure).

Obviously, I don't know how you've organized your data but if I were
creating a database, I would not have one person's information in one
sheet. Rather, I would create a table that has one person's
information in one row. The one table would hold information about the
rent status for all the renters.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
Top