Calendar - conditional formatting?
Hi Valery,
Try something like:
'=============
Public Sub Tester()
Dim rng As Range
Dim rCell As Range
Set rng = Selection '<<==== CHANGE
For Each rCell In Selection
With rCell
.Value = DateSerial(Year(Date), 1, .Value)
End With
Next rCell
rng.NumberFormat = "d"
End Sub
'<<=============
Replace 1 with the number of the month of interest.
---
Regards,
Norman
"Valery2105" wrote in message
...
Hi, I have been searching hi and low for a solution to this and beginning
to
think it may not be possible, please help you are my last hope.
I have a worksheet that has a 12 month calendar on it formatted as below:
January
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
1. I have 5 columns in the same worksheet:
No. Training Title Description Start Date End Date
1 Excel Pivot Table 06/07/06 08/07/06
The No. & Training Title columns are colour filled (there are 29 rows with
different colours)
2. When inputting the start and end date I would like the calendar to
automatically fill with the same colour as in the No. and Training Title.
3. How can I format the numbers in the calendar so that they are
recognised
as dates?
Thanks
|