A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do I have excel highlight days before & after a date on a cale



 
 
Thread Tools Display Modes
  #1  
Old February 13th, 2010, 05:34 PM posted to microsoft.public.excel.worksheet.functions
Moovysheek
external usenet poster
 
Posts: 4
Default How do I have excel highlight days before & after a date on a cale

How do have excel highlight 15 days prior to a chosen date on the calendar
below & 30 days after?

2010

JANUARY FEBRUARY
S M T W T F S S M T W T F S
1 2 1 2 3 4 5 6
3 4 5 6 7 8 9 7 8 9 10 11 12 13
10 11 12 13 14 15 16 14 15 16 17 18 19 20
17 18 19 20 21 22 23 21 22 23 24 25 26 27
24 25 26 27 28 29 30 28
31

MARCH APRIL
S M T W T F S S M T W T F S
1 2 3 4 5 6 1 2 3
7 8 9 10 11 12 13 4 5 6 7 8 9 10
14 15 16 17 18 19 20 11 12 13 14 15 16 17
21 22 23 24 25 26 27 18 19 20 21 22 23 24
28 29 30 31 25 26 27 28 29 30

MAY JUNE
S M T W T F S S M T W T F S
1 1 2 3 4 5
2 3 4 5 6 7 8 6 7 8 9 10 11 12
9 10 11 12 13 14 15 13 14 15 16 17 18 19
16 17 18 19 20 21 22 20 21 22 23 24 25 26
23 24 25 26 27 28 29 27 28 29 30
30 31

JULY AUGUST
S M T W T F S S M T W T F S
1 2 3 1 2 3 4 5 6 7
4 5 6 7 8 9 10 8 9 10 11 12 13 14
11 12 13 14 15 16 17 15 16 17 18 19 20 21
18 19 20 21 22 23 24 22 23 24 25 26 27 28
25 26 27 28 29 30 31 29 30 31

SEPTEMBER OCTOBER
S M T W T F S S M T W T F S
1 2 3 4 1 2
5 6 7 8 9 10 11 3 4 5 6 7 8 9
12 13 14 15 16 17 18 10 11 12 13 14 15 16
19 20 21 22 23 24 25 17 18 19 20 21 22 23
26 27 28 29 30 24 25 26 27 28 29 30
31

NOVEMBER DECEMBER
S M T W T F S S M T W T F S
1 2 3 4 5 6 1 2 3 4
7 8 9 10 11 12 13 5 6 7 8 9 10 11
14 15 16 17 18 19 20 12 13 14 15 16 17 18
21 22 23 24 25 26 27 19 20 21 22 23 24 25
28 29 30 26 27 28 29 30 31


  #2  
Old February 13th, 2010, 05:47 PM posted to microsoft.public.excel.worksheet.functions
Fred Smith[_4_]
external usenet poster
 
Posts: 2,386
Default How do I have excel highlight days before & after a date on a cale

Look in Help for Conditional Formatting.

Regards,
Fred

"Moovysheek" wrote in message
...
How do have excel highlight 15 days prior to a chosen date on the calendar
below & 30 days after?

2010

JANUARY FEBRUARY
S M T W T F S S M T W T F S
1 2 1 2 3 4 5 6
3 4 5 6 7 8 9 7 8 9 10 11 12 13
10 11 12 13 14 15 16 14 15 16 17 18 19 20
17 18 19 20 21 22 23 21 22 23 24 25 26 27
24 25 26 27 28 29 30 28
31

MARCH APRIL
S M T W T F S S M T W T F S
1 2 3 4 5 6 1 2 3
7 8 9 10 11 12 13 4 5 6 7 8 9 10
14 15 16 17 18 19 20 11 12 13 14 15 16 17
21 22 23 24 25 26 27 18 19 20 21 22 23 24
28 29 30 31 25 26 27 28 29 30

MAY JUNE
S M T W T F S S M T W T F S
1 1 2 3 4 5
2 3 4 5 6 7 8 6 7 8 9 10 11 12
9 10 11 12 13 14 15 13 14 15 16 17 18 19
16 17 18 19 20 21 22 20 21 22 23 24 25 26
23 24 25 26 27 28 29 27 28 29 30
30 31

JULY AUGUST
S M T W T F S S M T W T F S
1 2 3 1 2 3 4 5 6 7
4 5 6 7 8 9 10 8 9 10 11 12 13 14
11 12 13 14 15 16 17 15 16 17 18 19 20 21
18 19 20 21 22 23 24 22 23 24 25 26 27 28
25 26 27 28 29 30 31 29 30 31

SEPTEMBER OCTOBER
S M T W T F S S M T W T F S
1 2 3 4 1 2
5 6 7 8 9 10 11 3 4 5 6 7 8 9
12 13 14 15 16 17 18 10 11 12 13 14 15 16
19 20 21 22 23 24 25 17 18 19 20 21 22 23
26 27 28 29 30 24 25 26 27 28 29 30
31

NOVEMBER DECEMBER
S M T W T F S S M T W T F S
1 2 3 4 5 6 1 2 3 4
7 8 9 10 11 12 13 5 6 7 8 9 10 11
14 15 16 17 18 19 20 12 13 14 15 16 17 18
21 22 23 24 25 26 27 19 20 21 22 23 24 25
28 29 30 26 27 28 29 30 31



  #3  
Old February 13th, 2010, 06:35 PM posted to microsoft.public.excel.worksheet.functions
Don Guillett[_2_]
external usenet poster
 
Posts: 607
Default How do I have excel highlight days before & after a date on a cale

The simplest approach is to have your dates in a column and use this
inserted into the sheet module .
Then when you select a cell in col A the 45 day block will be shown in
yellow

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Columns(1).Interior.ColorIndex = xlColorIndexNone
mr = Application.Max(1, Target.Row - 15)
Cells(mr, 1).Resize(45) .Interior.ColorIndex = 6
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Moovysheek" wrote in message
...
How do have excel highlight 15 days prior to a chosen date on the calendar
below & 30 days after?

2010

JANUARY FEBRUARY
S M T W T F S S M T W T F S
1 2 1 2 3 4 5 6
3 4 5 6 7 8 9 7 8 9 10 11 12 13
10 11 12 13 14 15 16 14 15 16 17 18 19 20
17 18 19 20 21 22 23 21 22 23 24 25 26 27
24 25 26 27 28 29 30 28
31

MARCH APRIL
S M T W T F S S M T W T F S
1 2 3 4 5 6 1 2 3
7 8 9 10 11 12 13 4 5 6 7 8 9 10
14 15 16 17 18 19 20 11 12 13 14 15 16 17
21 22 23 24 25 26 27 18 19 20 21 22 23 24
28 29 30 31 25 26 27 28 29 30

MAY JUNE
S M T W T F S S M T W T F S
1 1 2 3 4 5
2 3 4 5 6 7 8 6 7 8 9 10 11 12
9 10 11 12 13 14 15 13 14 15 16 17 18 19
16 17 18 19 20 21 22 20 21 22 23 24 25 26
23 24 25 26 27 28 29 27 28 29 30
30 31

JULY AUGUST
S M T W T F S S M T W T F S
1 2 3 1 2 3 4 5 6 7
4 5 6 7 8 9 10 8 9 10 11 12 13 14
11 12 13 14 15 16 17 15 16 17 18 19 20 21
18 19 20 21 22 23 24 22 23 24 25 26 27 28
25 26 27 28 29 30 31 29 30 31

SEPTEMBER OCTOBER
S M T W T F S S M T W T F S
1 2 3 4 1 2
5 6 7 8 9 10 11 3 4 5 6 7 8 9
12 13 14 15 16 17 18 10 11 12 13 14 15 16
19 20 21 22 23 24 25 17 18 19 20 21 22 23
26 27 28 29 30 24 25 26 27 28 29 30
31

NOVEMBER DECEMBER
S M T W T F S S M T W T F S
1 2 3 4 5 6 1 2 3 4
7 8 9 10 11 12 13 5 6 7 8 9 10 11
14 15 16 17 18 19 20 12 13 14 15 16 17 18
21 22 23 24 25 26 27 19 20 21 22 23 24 25
28 29 30 26 27 28 29 30 31



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:05 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.