Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Kirk
 
Posts: n/a
Default Conditional Formatting using Formulas and WEEKNUM

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().

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

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().

  #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().

  #4   Report Post  
Posted to microsoft.public.excel.misc
Kirk
 
Posts: n/a
Default Conditional Formatting using Formulas and WEEKNUM

Thanks. This wasn't the problem. I'm thinking WEEKNUM won't work in
Conditional Formatting. If someone can help there. (I may need to set up
dummy cells with the WEEKNUM values and compare them to each other.

Kirk

"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().

  #5   Report Post  
Posted to microsoft.public.excel.misc
Kirk
 
Posts: n/a
Default Conditional Formatting using Formulas and WEEKNUM

PERFECT !!!! Thank you so much! Works perfectly!
And I didn't even think of what year the week is in. My conditional
formatting function was to grey out dates that were past, highlight a cell in
red that's today, and higlight a cell in yellow for what dates are this week!
I got the first two, but coouldn't figure out the 3rd.

V/R, Kirk

"Sloth" wrote:

=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().



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default Conditional Formatting using Formulas and WEEKNUM

Hi

this is what i also want but I want it to shade the whole row. Does anyone
know how to do that?
Thanks
Debbie

"Kirk" wrote:

Thanks. This wasn't the problem. I'm thinking WEEKNUM won't work in
Conditional Formatting. If someone can help there. (I may need to set up
dummy cells with the WEEKNUM values and compare them to each other.

Kirk

"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().

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Conditional Formatting using Formulas and WEEKNUM


1. Select the cells to be formatted (say row A in this example)
2. Choose FormatConditional Formatting...
3. From the first drop-down list, choose Formula Is
4. In the text box, enter a formula that refers to the active cell in
the selection.
For example: =$A175
5. Click the Format button.
6. Select the formatting options, click OK
7. Click OK
Make sure the colmun refence is preceded with the $ sign

Phippsy;310492 Wrote:
Hi

this is what i also want but I want it to shade the whole row. Does
anyone
know how to do that?
Thanks
Debbie

"Kirk" wrote:

Thanks. This wasn't the problem. I'm thinking WEEKNUM won't work

in
Conditional Formatting. If someone can help there. (I may need to

set up
dummy cells with the WEEKNUM values and compare them to each other.

Kirk

"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().



--
Pecoflyer

Cheers -
*'Membership is free' (http://www.thecodecage.com)* & allows file
upload -faster and better answers

*Adding your XL version* to your post helps finding solution faster
------------------------------------------------------------------------
Pecoflyer's Profile: http://www.thecodecage.com/forumz/member.php?userid=14
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=86802

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default Conditional Formatting using Formulas and WEEKNUM

Brilliant thanks

"Pecoflyer" wrote:


1. Select the cells to be formatted (say row A in this example)
2. Choose FormatConditional Formatting...
3. From the first drop-down list, choose Formula Is
4. In the text box, enter a formula that refers to the active cell in
the selection.
For example: =$A175
5. Click the Format button.
6. Select the formatting options, click OK
7. Click OK
Make sure the colmun refence is preceded with the $ sign

Phippsy;310492 Wrote:
Hi

this is what i also want but I want it to shade the whole row. Does
anyone
know how to do that?
Thanks
Debbie

"Kirk" wrote:

Thanks. This wasn't the problem. I'm thinking WEEKNUM won't work

in
Conditional Formatting. If someone can help there. (I may need to

set up
dummy cells with the WEEKNUM values and compare them to each other.

Kirk

"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().



--
Pecoflyer

Cheers -
*'Membership is free' (http://www.thecodecage.com)* & allows file
upload -faster and better answers

*Adding your XL version* to your post helps finding solution faster
------------------------------------------------------------------------
Pecoflyer's Profile: http://www.thecodecage.com/forumz/member.php?userid=14
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=86802


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



All times are GMT +1. The time now is 01:16 PM.

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"