#1   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 390
Default Calendar 2

Here I have a calendar where every day has 2 rows. In this example let say
that today's date is 1st January. I need that cell B2 (Highlight) will be
highlighted with any colour as I open the file and cell B3 (Details) remains
empty where I can put my details. Any help please?

Thanks in adnance.

A B C D E F
__________________________________________________ __
1 JAN FEB MAR APR MAY
__________________________________________________ __
2 1 Highlight
3 Details
__________________________________________________ ___
4 2
5
__________________________________________________ ____
6 3
7
__________________________________________________ ____
8 4
9
__________________________________________________ ______
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default Calendar 2

You conditional formatting formula for cell C2 is:

=DATE(YEAR(TODAY()),TEXT(1&" "&C$1&" "&2000,"mm"),DAY($B2)) = TODAY()

NOTE: TEXT(1&" "&C$1&" "&2000,"mm") converts JAN, FEB, MAR to 01. 02, 03 for
the Date() function. It will also convert January, February, March.
--
Steve

"MAX" wrote in message
...
Here I have a calendar where every day has 2 rows. In this example let say
that today's date is 1st January. I need that cell B2 (Highlight) will be
highlighted with any colour as I open the file and cell B3 (Details)
remains
empty where I can put my details. Any help please?

Thanks in adnance.

A B C D E F
__________________________________________________ __
1 JAN FEB MAR APR MAY
__________________________________________________ __
2 1 Highlight
3 Details
__________________________________________________ ___
4 2
5
__________________________________________________ ____
6 3
7
__________________________________________________ ____
8 4
9
__________________________________________________ ______


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Calendar 2

The below code will highlight the current day cell as per your calendar
layout. Place this code in workbook open event. If you have the calendar in a
default sheet you can add the sheet name as well. Launch VBE using Alt+F11.
From the treeview double click 'This Workbook' and paste this code.

Private Sub Workbook_Open()
Range("B2").Resize(62, 31).Interior.ColorIndex = xlNone
Cells(Day(Date) * 2, Month(Date) + 1).Interior.Color = vbYellow
End Sub


If this post helps click Yes
---------------
Jacob Skaria


"MAX" wrote:

Here I have a calendar where every day has 2 rows. In this example let say
that today's date is 1st January. I need that cell B2 (Highlight) will be
highlighted with any colour as I open the file and cell B3 (Details) remains
empty where I can put my details. Any help please?

Thanks in adnance.

A B C D E F
__________________________________________________ __
1 JAN FEB MAR APR MAY
__________________________________________________ __
2 1 Highlight
3 Details
__________________________________________________ ___
4 2
5
__________________________________________________ ____
6 3
7
__________________________________________________ ____
8 4
9
__________________________________________________ ______

  #4   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 390
Default Calendar 2



Hi Jacob
If I insert a row at the top, does the code remains the same?

Thanks in advance.


"Jacob Skaria" wrote:

The below code will highlight the current day cell as per your calendar
layout. Place this code in workbook open event. If you have the calendar in a
default sheet you can add the sheet name as well. Launch VBE using Alt+F11.
From the treeview double click 'This Workbook' and paste this code.

Private Sub Workbook_Open()
Range("B2").Resize(62, 31).Interior.ColorIndex = xlNone
Cells(Day(Date) * 2, Month(Date) + 1).Interior.Color = vbYellow
End Sub


If this post helps click Yes
---------------
Jacob Skaria


"MAX" wrote:

Here I have a calendar where every day has 2 rows. In this example let say
that today's date is 1st January. I need that cell B2 (Highlight) will be
highlighted with any colour as I open the file and cell B3 (Details) remains
empty where I can put my details. Any help please?

Thanks in adnance.

A B C D E F
__________________________________________________ __
1 JAN FEB MAR APR MAY
__________________________________________________ __
2 1 Highlight
3 Details
__________________________________________________ ___
4 2
5
__________________________________________________ ____
6 3
7
__________________________________________________ ____
8 4
9
__________________________________________________ ______

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Calendar 2

With one row on top ...I have changed B2 to C2 and the day row +1. Try the
below and feedback

Private Sub Workbook_Open()
Range("C2").Resize(62, 31).Interior.ColorIndex = xlNone
Cells(1+(Day(Date) * 2), Month(Date) + 1).Interior.Color = vbYellow
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"MAX" wrote:



Hi Jacob
If I insert a row at the top, does the code remains the same?

Thanks in advance.


"Jacob Skaria" wrote:

The below code will highlight the current day cell as per your calendar
layout. Place this code in workbook open event. If you have the calendar in a
default sheet you can add the sheet name as well. Launch VBE using Alt+F11.
From the treeview double click 'This Workbook' and paste this code.

Private Sub Workbook_Open()
Range("B2").Resize(62, 31).Interior.ColorIndex = xlNone
Cells(Day(Date) * 2, Month(Date) + 1).Interior.Color = vbYellow
End Sub


If this post helps click Yes
---------------
Jacob Skaria


"MAX" wrote:

Here I have a calendar where every day has 2 rows. In this example let say
that today's date is 1st January. I need that cell B2 (Highlight) will be
highlighted with any colour as I open the file and cell B3 (Details) remains
empty where I can put my details. Any help please?

Thanks in adnance.

A B C D E F
__________________________________________________ __
1 JAN FEB MAR APR MAY
__________________________________________________ __
2 1 Highlight
3 Details
__________________________________________________ ___
4 2
5
__________________________________________________ ____
6 3
7
__________________________________________________ ____
8 4
9
__________________________________________________ ______



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Calendar 2

Opps
With one row on top ...I have changed B2 to B3 and the day row +1. Try the
below and feedback

Private Sub Workbook_Open()
Range("B3").Resize(62, 31).Interior.ColorIndex = xlNone
Cells(1+(Day(Date) * 2), Month(Date) + 1).Interior.Color = vbYellow
End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

With one row on top ...I have changed B2 to C2 and the day row +1. Try the
below and feedback

Private Sub Workbook_Open()
Range("C2").Resize(62, 31).Interior.ColorIndex = xlNone
Cells(1+(Day(Date) * 2), Month(Date) + 1).Interior.Color = vbYellow
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"MAX" wrote:



Hi Jacob
If I insert a row at the top, does the code remains the same?

Thanks in advance.


"Jacob Skaria" wrote:

The below code will highlight the current day cell as per your calendar
layout. Place this code in workbook open event. If you have the calendar in a
default sheet you can add the sheet name as well. Launch VBE using Alt+F11.
From the treeview double click 'This Workbook' and paste this code.

Private Sub Workbook_Open()
Range("B2").Resize(62, 31).Interior.ColorIndex = xlNone
Cells(Day(Date) * 2, Month(Date) + 1).Interior.Color = vbYellow
End Sub


If this post helps click Yes
---------------
Jacob Skaria


"MAX" wrote:

Here I have a calendar where every day has 2 rows. In this example let say
that today's date is 1st January. I need that cell B2 (Highlight) will be
highlighted with any colour as I open the file and cell B3 (Details) remains
empty where I can put my details. Any help please?

Thanks in adnance.

A B C D E F
__________________________________________________ __
1 JAN FEB MAR APR MAY
__________________________________________________ __
2 1 Highlight
3 Details
__________________________________________________ ___
4 2
5
__________________________________________________ ____
6 3
7
__________________________________________________ ____
8 4
9
__________________________________________________ ______

  #7   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 390
Default Calendar 2

It works both with Range("C2") and Range("B3").

Thanks a lot.

"Jacob Skaria" wrote:

Opps
With one row on top ...I have changed B2 to B3 and the day row +1. Try the
below and feedback

Private Sub Workbook_Open()
Range("B3").Resize(62, 31).Interior.ColorIndex = xlNone
Cells(1+(Day(Date) * 2), Month(Date) + 1).Interior.Color = vbYellow
End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

With one row on top ...I have changed B2 to C2 and the day row +1. Try the
below and feedback

Private Sub Workbook_Open()
Range("C2").Resize(62, 31).Interior.ColorIndex = xlNone
Cells(1+(Day(Date) * 2), Month(Date) + 1).Interior.Color = vbYellow
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"MAX" wrote:



Hi Jacob
If I insert a row at the top, does the code remains the same?

Thanks in advance.


"Jacob Skaria" wrote:

The below code will highlight the current day cell as per your calendar
layout. Place this code in workbook open event. If you have the calendar in a
default sheet you can add the sheet name as well. Launch VBE using Alt+F11.
From the treeview double click 'This Workbook' and paste this code.

Private Sub Workbook_Open()
Range("B2").Resize(62, 31).Interior.ColorIndex = xlNone
Cells(Day(Date) * 2, Month(Date) + 1).Interior.Color = vbYellow
End Sub


If this post helps click Yes
---------------
Jacob Skaria


"MAX" wrote:

Here I have a calendar where every day has 2 rows. In this example let say
that today's date is 1st January. I need that cell B2 (Highlight) will be
highlighted with any colour as I open the file and cell B3 (Details) remains
empty where I can put my details. Any help please?

Thanks in adnance.

A B C D E F
__________________________________________________ __
1 JAN FEB MAR APR MAY
__________________________________________________ __
2 1 Highlight
3 Details
__________________________________________________ ___
4 2
5
__________________________________________________ ____
6 3
7
__________________________________________________ ____
8 4
9
__________________________________________________ ______

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert date from Gregorian Calendar to Hijri Calendar H.Alkhodary Excel Discussion (Misc queries) 1 February 21st 09 10:11 AM
find free sharware to include calendar pop or use calendar in cell ednc Excel Discussion (Misc queries) 2 April 14th 08 05:05 PM
how do i export excel calendar info to outlook calendar? Maggie Excel Discussion (Misc queries) 1 December 31st 07 10:27 PM
Modify Yearly Calendar to Monthly Calendar Excel 2000? James Cooper Excel Programming 13 July 13th 06 11:46 PM
import calendar items from excel into outlook calendar jsewaiseh Excel Discussion (Misc queries) 0 September 2nd 05 03:53 PM


All times are GMT +1. The time now is 08:50 AM.

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

About Us

"It's about Microsoft Excel"