#1   Report Post  
Posted to microsoft.public.excel.misc
Howard
 
Posts: n/a
Default January 2006

In cells a1, b1, etc., I have the month-end date, like 12/31/2005. Now that
January 2006 has rolled around, I want the column with the date 12/31/2005 to
highlight using conditional formatting.
The Month function works well within the current year
(=MONTH(a$1)=MONTH(TODAY())-1, but how do I get the prior year-end month
(Dec) to highlight when the first month of the current year rolls around?
--
Howard
  #2   Report Post  
Posted to microsoft.public.excel.misc
pinmaster
 
Posts: n/a
Default January 2006


Similar as what you have now except with Year() added

=AND(MONTH(A$1)=MONTH(TODAY())-1,YEAR(A$1)=YEAR(TODAY())-1)

Regards
JG


--
pinmaster
------------------------------------------------------------------------
pinmaster's Profile: http://www.excelforum.com/member.php...fo&userid=6261
View this thread: http://www.excelforum.com/showthread...hreadid=497695

  #3   Report Post  
Posted to microsoft.public.excel.misc
pinmaster
 
Posts: n/a
Default January 2006


Nevermind, I guess it doesn't work!


--
pinmaster
------------------------------------------------------------------------
pinmaster's Profile: http://www.excelforum.com/member.php...fo&userid=6261
View this thread: http://www.excelforum.com/showthread...hreadid=497695

  #4   Report Post  
Posted to microsoft.public.excel.misc
pinmaster
 
Posts: n/a
Default January 2006


Try this:

=AND(MONTH(A1)=12,MONTH(TODAY())=1,YEAR(TODAY())=Y EAR(A1)+1)

HTH
JG


--
pinmaster
------------------------------------------------------------------------
pinmaster's Profile: http://www.excelforum.com/member.php...fo&userid=6261
View this thread: http://www.excelforum.com/showthread...hreadid=497695

  #5   Report Post  
Posted to microsoft.public.excel.misc
Howard
 
Posts: n/a
Default January 2006

Thanks! I knew I had to get the year in there somewhere, but I didn't know how.
--
Howard


"pinmaster" wrote:


Similar as what you have now except with Year() added

=AND(MONTH(A$1)=MONTH(TODAY())-1,YEAR(A$1)=YEAR(TODAY())-1)

Regards
JG


--
pinmaster
------------------------------------------------------------------------
pinmaster's Profile: http://www.excelforum.com/member.php...fo&userid=6261
View this thread: http://www.excelforum.com/showthread...hreadid=497695




  #6   Report Post  
Posted to microsoft.public.excel.misc
JAdamJ
 
Posts: n/a
Default January 2006

if you are sure that your dates are the true month end dates, try this:
=AND(MONTH(A$1+1)=MONTH(TODAY()),YEAR(A$1+1)=YEAR( TODAY()))

If you don't include the Year then you will highlight the previous month for
every year on your spreadsheet.

"Howard" wrote:

In cells a1, b1, etc., I have the month-end date, like 12/31/2005. Now that
January 2006 has rolled around, I want the column with the date 12/31/2005 to
highlight using conditional formatting.
The Month function works well within the current year
(=MONTH(a$1)=MONTH(TODAY())-1, but how do I get the prior year-end month
(Dec) to highlight when the first month of the current year rolls around?
--
Howard

  #7   Report Post  
Posted to microsoft.public.excel.misc
Howard
 
Posts: n/a
Default January 2006

It worked! Thanks. I had to chage +1 to -1, since I was going back to the
previous month.
--
Howard


"JAdamJ" wrote:

if you are sure that your dates are the true month end dates, try this:
=AND(MONTH(A$1+1)=MONTH(TODAY()),YEAR(A$1+1)=YEAR( TODAY()))

If you don't include the Year then you will highlight the previous month for
every year on your spreadsheet.

"Howard" wrote:

In cells a1, b1, etc., I have the month-end date, like 12/31/2005. Now that
January 2006 has rolled around, I want the column with the date 12/31/2005 to
highlight using conditional formatting.
The Month function works well within the current year
(=MONTH(a$1)=MONTH(TODAY())-1, but how do I get the prior year-end month
(Dec) to highlight when the first month of the current year rolls around?
--
Howard

  #8   Report Post  
Posted to microsoft.public.excel.misc
Howard
 
Posts: n/a
Default January 2006

Oops, it's not working. It highlights the January 31, 2006 column instead of
the December 31, 2005 column.
--
Howard


"JAdamJ" wrote:

if you are sure that your dates are the true month end dates, try this:
=AND(MONTH(A$1+1)=MONTH(TODAY()),YEAR(A$1+1)=YEAR( TODAY()))

If you don't include the Year then you will highlight the previous month for
every year on your spreadsheet.

"Howard" wrote:

In cells a1, b1, etc., I have the month-end date, like 12/31/2005. Now that
January 2006 has rolled around, I want the column with the date 12/31/2005 to
highlight using conditional formatting.
The Month function works well within the current year
(=MONTH(a$1)=MONTH(TODAY())-1, but how do I get the prior year-end month
(Dec) to highlight when the first month of the current year rolls around?
--
Howard

  #9   Report Post  
Posted to microsoft.public.excel.misc
JAdamJ
 
Posts: n/a
Default January 2006

I copied and pasted it exactly as I have it written below, and it's
highlighting the December 31, 2005 column. Are you sure you need to change
the +1 to -1?

"Howard" wrote:

Oops, it's not working. It highlights the January 31, 2006 column instead of
the December 31, 2005 column.
--
Howard


"JAdamJ" wrote:

if you are sure that your dates are the true month end dates, try this:
=AND(MONTH(A$1+1)=MONTH(TODAY()),YEAR(A$1+1)=YEAR( TODAY()))

If you don't include the Year then you will highlight the previous month for
every year on your spreadsheet.

"Howard" wrote:

In cells a1, b1, etc., I have the month-end date, like 12/31/2005. Now that
January 2006 has rolled around, I want the column with the date 12/31/2005 to
highlight using conditional formatting.
The Month function works well within the current year
(=MONTH(a$1)=MONTH(TODAY())-1, but how do I get the prior year-end month
(Dec) to highlight when the first month of the current year rolls around?
--
Howard

  #10   Report Post  
Posted to microsoft.public.excel.misc
Howard
 
Posts: n/a
Default January 2006

You're right, it works! I must have typed it in incorrectly. So I copied and
pasted.

Thanks,
--
Howard


"JAdamJ" wrote:

I copied and pasted it exactly as I have it written below, and it's
highlighting the December 31, 2005 column. Are you sure you need to change
the +1 to -1?

"Howard" wrote:

Oops, it's not working. It highlights the January 31, 2006 column instead of
the December 31, 2005 column.
--
Howard


"JAdamJ" wrote:

if you are sure that your dates are the true month end dates, try this:
=AND(MONTH(A$1+1)=MONTH(TODAY()),YEAR(A$1+1)=YEAR( TODAY()))

If you don't include the Year then you will highlight the previous month for
every year on your spreadsheet.

"Howard" wrote:

In cells a1, b1, etc., I have the month-end date, like 12/31/2005. Now that
January 2006 has rolled around, I want the column with the date 12/31/2005 to
highlight using conditional formatting.
The Month function works well within the current year
(=MONTH(a$1)=MONTH(TODAY())-1, but how do I get the prior year-end month
(Dec) to highlight when the first month of the current year rolls around?
--
Howard



  #11   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld
 
Posts: n/a
Default January 2006

On Tue, 3 Jan 2006 13:31:01 -0800, Howard
wrote:

In cells a1, b1, etc., I have the month-end date, like 12/31/2005. Now that
January 2006 has rolled around, I want the column with the date 12/31/2005 to
highlight using conditional formatting.
The Month function works well within the current year
(=MONTH(a$1)=MONTH(TODAY())-1, but how do I get the prior year-end month
(Dec) to highlight when the first month of the current year rolls around?


Well, if, in fact, the date at the header of the column is the last date of the
month, then:

Cell Value Is Equal To: =TODAY()-DAY(TODAY())
--ron
  #12   Report Post  
Posted to microsoft.public.excel.misc
Howard
 
Posts: n/a
Default January 2006

Ron,

Thanks! Works nicely!
--
Howard


"Ron Rosenfeld" wrote:

On Tue, 3 Jan 2006 13:31:01 -0800, Howard
wrote:

In cells a1, b1, etc., I have the month-end date, like 12/31/2005. Now that
January 2006 has rolled around, I want the column with the date 12/31/2005 to
highlight using conditional formatting.
The Month function works well within the current year
(=MONTH(a$1)=MONTH(TODAY())-1, but how do I get the prior year-end month
(Dec) to highlight when the first month of the current year rolls around?


Well, if, in fact, the date at the header of the column is the last date of the
month, then:

Cell Value Is Equal To: =TODAY()-DAY(TODAY())
--ron

  #13   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld
 
Posts: n/a
Default January 2006

On Tue, 3 Jan 2006 19:28:02 -0800, Howard
wrote:

Ron,

Thanks! Works nicely!


You're welcome. It seems simpler than some of the other solutions, too.

You can also use CF to bold an entire column by using mixed references:

In A1

Format/Conditional Formatting/Formula Is:

=A$1=(TODAY()-DAY(TODAY()))

Then use the format painter to copy that to your entire table.


--ron
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
2005 to 2006 calendar? jhr10 Excel Worksheet Functions 1 November 19th 05 10:08 AM
Format date in excel 2000 like '31st January 2005' Malcolm Agingwell Excel Discussion (Misc queries) 4 July 14th 05 03:39 PM
Date Calculations Bruce Excel Worksheet Functions 11 May 19th 05 01:09 AM
excel calendar year resetting 2005 2006 whowatwerwyhow Excel Discussion (Misc queries) 1 May 16th 05 12:29 PM
Where can I find a 2006 Business Calendar template? Cindy Charts and Charting in Excel 1 March 22nd 05 03:02 AM


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

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

About Us

"It's about Microsoft Excel"