View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Sloth
 
Posts: n/a
Default Conditional Formatting using Formulas and WEEKNUM

=A2-WEEKDAY(A2)=TODAY()-WEEKDAY(TODAY())

Might be more usefull, because it only includes days of the current week in
the current year. For instance 1/1/2003 and 1/1/2005 both return a WEEKNUM
of 1 don't they? With my function though, it isn't in the same week. Or is
that what you wanted? The function above assumes a week starts on Sunday.

Depending on what you want, this might not be as usefull because 12/31/2004
(a friday) would be included in the same week as 1/1/2005 (a saturday).

"Sloth" wrote:

Remove the quotes and it should work. Quotes usually appear if you forget
the first '='. I am not sure why, they just mess things up.

I don't use the analysis toolpak, so I can't tell if the problem is with the
WEEKNUM function (I doubt it is though).

"Kirk" wrote:

I'm trying to conditional format to highlight a date cell if its in the
current week.

I know whow to use WEEKNUM to check a week's number (1-53). I did check to
make sure the Analyst Pack was loaded.

The challenge I have is getting conditional formatting using formulas to
check the current cell

I'm trying the following formula: (In Conditional Formatting)
="WEEKNUM($C$4,1) = WEEKNUM($A$1,1)" with no results
C4 is the current cell, A1 is a refernce cell with TODAY().