View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Macro for Changing Cell Background Color

Rick, rather than use less than etc., you need to change the condition
dropdown to Formula Is and add a formula. Peter suggesting linking the
checkbox to a cell, so assuming it is a Forms toolbar checkbox, a formula
would be of the type

=AND(M1=1,A1=TODAY())

where M1 is the checkbox linked cell and A1 is the data cell.



--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
oups.com...
Hey Peter,

Could you explain how to create the three "FC's"? I know how to make a
condition such as 'less than a certain cell value' but I'm not sure how
to make a conditional format that relys on a checkbox and a cell value.
Thanks!

Rick


Peter T wrote:
Hi Rick,

If you're happy to use conditional formats, why not use 3 FC's

FC1 checked and Today
FC2 checked
FC3 today

where Checked refers to the Checkbox linked cell or some other value you
change by code with the checkbox and today = cell's date (IsFormula).

Regards,
Peter T


wrote in message
ups.com...
Hello,

I'm trying to setup a macro that will automatically change the color

of
a cell's background when the cell's date data equals TODAY(). I know

I
can do this with conditional formatting, but I also need it to change
to another color once a checkbox has been checked, and this will not
work with conditional formatting (any changes to the background color
will be overridden by the conditional formatting). Is there anyway to
do this in VBcode? Any help would be fantastic. Thanks!

Rick