VB code for autofill
Do you mean that you do not want to see the dates; just the fill color?
If above assumption is correct then don't use my previous suggestion and
apply conditional format as follows.
Select the entire range to be conditionally formatted. (E2:DV? where ? is
max row.)
Select conditional format.
Select formula.
Enter the following formula for week days fill.
=AND(E$1=$C2,E$1<=$D2,WEEKDAY(E$1,2)<6)
Click Format button and set fill color.
Add a rule.
Enter the following formula for weekend fill.
=WEEKDAY(E$1,2)5
Click Format button and set fill color.
Above should work irrespective of whether you use my previous suggestion to
display the dates or if you don't want the dates displayed and you just want
to see the colors.
Don't know if you are aware of this but a tip for entering Conditional
Format. Select the entire range to be formatted and enter the formula as if
you are formatting the first cell in the range only. However, you do have to
think about what addresses need to have absolute addressing (with the $
signs) if the formula is to apply to the rest of the selection. Excel then
automatically applies the Conditional Format to the entire selected range
--
Regards,
OssieMac
|