Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ken Ken is offline
external usenet poster
 
Posts: 590
Default Weeknum vs Conditional Formatting

Excel2003 ... Weeknum vs Conditional Formatting???

Cell E1 ... =IF(ISBLANK($D1),"",D1+7) ... Return = 01/14/07 ... ok
Cell E3 ... Conditional Format Formula ... Format Pattern Gold ... not
working???

=weeknum(today(),2)<weeknum(e$1,2) ... Returns error message =

"You may not use references to other worksheets or workbooks for Conditional
Formatting criteria."

I am stuck ... Help! ... Thanks ... Kha








  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Weeknum vs Conditional Formatting

The Weeknum function is part of the Analysis Toolpak, an add-in, which Excel
sees as another workbook. Try this instead

=1+INT((TODAY()-(DATE(YEAR(TODAY()),1,2)-WEEKDAY(DATE(YEAR(TODAY()),1,1))))/7)<1+INT((TODAY()-(DATE(YEAR($E$1),1,2)-WEEKDAY(DATE(YEAR($E$1),1,1))))/7)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Ken" wrote in message
...
Excel2003 ... Weeknum vs Conditional Formatting???

Cell E1 ... =IF(ISBLANK($D1),"",D1+7) ... Return = 01/14/07 ... ok
Cell E3 ... Conditional Format Formula ... Format Pattern Gold ... not
working???

=weeknum(today(),2)<weeknum(e$1,2) ... Returns error message =

"You may not use references to other worksheets or workbooks for
Conditional
Formatting criteria."

I am stuck ... Help! ... Thanks ... Kha










  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Weeknum vs Conditional Formatting

=weeknum(today(),2)

You could give that portion a defined name like, say, WeekToday

Then:

=WeekToday<1+INT((TODAY()-(DATE(YEAR($E$1),1,2)-WEEKDAY(DATE(YEAR($E$1),1,1))))/7)

Biff

"Bob Phillips" wrote in message
...
The Weeknum function is part of the Analysis Toolpak, an add-in, which
Excel sees as another workbook. Try this instead

=1+INT((TODAY()-(DATE(YEAR(TODAY()),1,2)-WEEKDAY(DATE(YEAR(TODAY()),1,1))))/7)<1+INT((TODAY()-(DATE(YEAR($E$1),1,2)-WEEKDAY(DATE(YEAR($E$1),1,1))))/7)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"Ken" wrote in message
...
Excel2003 ... Weeknum vs Conditional Formatting???

Cell E1 ... =IF(ISBLANK($D1),"",D1+7) ... Return = 01/14/07 ... ok
Cell E3 ... Conditional Format Formula ... Format Pattern Gold ... not
working???

=weeknum(today(),2)<weeknum(e$1,2) ... Returns error message =

"You may not use references to other worksheets or workbooks for
Conditional
Formatting criteria."

I am stuck ... Help! ... Thanks ... Kha












  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Weeknum vs Conditional Formatting

I think the second half of the formula is mixed up. You need to replace
TODAY() with E1.

With that change some of the week numbers are off by 1 compared to Excel's
WEEKNUM function: =WEEKNUM(date,2)

Your formula seems to be based on return_type 1 (Sunday is first DOW)

In my other reply I assumed that was correct and just copied that portion
into my formula.

With this portion given the defined name of WeekToday:

=WEEKNUM(TODAY(),2)

This corrected formula should work:

=WeekToday<INT((WEEKDAY(DATE(YEAR(E1),1,2-2))+E1-DATE(YEAR(E1),1,-5))/7)

From Mike Holland posted on Dick's Daily Dose of Excel:

Replacement for the ATP WEEKNUM function:

=INT((WEEKDAY(DATE(YEAR(date),1,2-return_type))+date-DATE(YEAR(date),1,-5))/7)

Biff

"Bob Phillips" wrote in message
...
The Weeknum function is part of the Analysis Toolpak, an add-in, which
Excel sees as another workbook. Try this instead

=1+INT((TODAY()-(DATE(YEAR(TODAY()),1,2)-WEEKDAY(DATE(YEAR(TODAY()),1,1))))/7)<1+INT((TODAY()-(DATE(YEAR($E$1),1,2)-WEEKDAY(DATE(YEAR($E$1),1,1))))/7)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"Ken" wrote in message
...
Excel2003 ... Weeknum vs Conditional Formatting???

Cell E1 ... =IF(ISBLANK($D1),"",D1+7) ... Return = 01/14/07 ... ok
Cell E3 ... Conditional Format Formula ... Format Pattern Gold ... not
working???

=weeknum(today(),2)<weeknum(e$1,2) ... Returns error message =

"You may not use references to other worksheets or workbooks for
Conditional
Formatting criteria."

I am stuck ... Help! ... Thanks ... Kha












  #5   Report Post  
Posted to microsoft.public.excel.misc
Ken Ken is offline
external usenet poster
 
Posts: 590
Default Weeknum vs Conditional Formatting

The replacement for the ATP Weeknum function worked (nice to know) ... That
said ... this turned out much more complicated than I anticipated ... but
"thanks" to you & others that continue to support these boards ... I am there
.... Thanks ... Kha

"T. Valko" wrote:

I think the second half of the formula is mixed up. You need to replace
TODAY() with E1.

With that change some of the week numbers are off by 1 compared to Excel's
WEEKNUM function: =WEEKNUM(date,2)

Your formula seems to be based on return_type 1 (Sunday is first DOW)

In my other reply I assumed that was correct and just copied that portion
into my formula.

With this portion given the defined name of WeekToday:

=WEEKNUM(TODAY(),2)

This corrected formula should work:

=WeekToday<INT((WEEKDAY(DATE(YEAR(E1),1,2-2))+E1-DATE(YEAR(E1),1,-5))/7)

From Mike Holland posted on Dick's Daily Dose of Excel:

Replacement for the ATP WEEKNUM function:

=INT((WEEKDAY(DATE(YEAR(date),1,2-return_type))+date-DATE(YEAR(date),1,-5))/7)

Biff

"Bob Phillips" wrote in message
...
The Weeknum function is part of the Analysis Toolpak, an add-in, which
Excel sees as another workbook. Try this instead

=1+INT((TODAY()-(DATE(YEAR(TODAY()),1,2)-WEEKDAY(DATE(YEAR(TODAY()),1,1))))/7)<1+INT((TODAY()-(DATE(YEAR($E$1),1,2)-WEEKDAY(DATE(YEAR($E$1),1,1))))/7)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"Ken" wrote in message
...
Excel2003 ... Weeknum vs Conditional Formatting???

Cell E1 ... =IF(ISBLANK($D1),"",D1+7) ... Return = 01/14/07 ... ok
Cell E3 ... Conditional Format Formula ... Format Pattern Gold ... not
working???

=weeknum(today(),2)<weeknum(e$1,2) ... Returns error message =

"You may not use references to other worksheets or workbooks for
Conditional
Formatting criteria."

I am stuck ... Help! ... Thanks ... Kha















  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Weeknum vs Conditional Formatting

You're welcome. Thanks for the feedback!

Biff

"Ken" wrote in message
...
The replacement for the ATP Weeknum function worked (nice to know) ...
That
said ... this turned out much more complicated than I anticipated ... but
"thanks" to you & others that continue to support these boards ... I am
there
... Thanks ... Kha

"T. Valko" wrote:

I think the second half of the formula is mixed up. You need to replace
TODAY() with E1.

With that change some of the week numbers are off by 1 compared to
Excel's
WEEKNUM function: =WEEKNUM(date,2)

Your formula seems to be based on return_type 1 (Sunday is first DOW)

In my other reply I assumed that was correct and just copied that portion
into my formula.

With this portion given the defined name of WeekToday:

=WEEKNUM(TODAY(),2)

This corrected formula should work:

=WeekToday<INT((WEEKDAY(DATE(YEAR(E1),1,2-2))+E1-DATE(YEAR(E1),1,-5))/7)

From Mike Holland posted on Dick's Daily Dose of Excel:

Replacement for the ATP WEEKNUM function:

=INT((WEEKDAY(DATE(YEAR(date),1,2-return_type))+date-DATE(YEAR(date),1,-5))/7)

Biff

"Bob Phillips" wrote in message
...
The Weeknum function is part of the Analysis Toolpak, an add-in, which
Excel sees as another workbook. Try this instead

=1+INT((TODAY()-(DATE(YEAR(TODAY()),1,2)-WEEKDAY(DATE(YEAR(TODAY()),1,1))))/7)<1+INT((TODAY()-(DATE(YEAR($E$1),1,2)-WEEKDAY(DATE(YEAR($E$1),1,1))))/7)

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"Ken" wrote in message
...
Excel2003 ... Weeknum vs Conditional Formatting???

Cell E1 ... =IF(ISBLANK($D1),"",D1+7) ... Return = 01/14/07 ... ok
Cell E3 ... Conditional Format Formula ... Format Pattern Gold ... not
working???

=weeknum(today(),2)<weeknum(e$1,2) ... Returns error message =

"You may not use references to other worksheets or workbooks for
Conditional
Formatting criteria."

I am stuck ... Help! ... Thanks ... Kha















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
Conditional Formatting using Formulas and WEEKNUM Kirk Excel Discussion (Misc queries) 7 April 16th 09 03:19 PM
conditional Formatting based on cell formatting Totom Excel Worksheet Functions 3 January 20th 07 02:02 PM
conditional Formatting based on cell formatting Totom Excel Worksheet Functions 0 January 15th 07 04:35 PM
weeknum formatting Terri Excel Discussion (Misc queries) 2 May 3rd 06 03:13 AM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM


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

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"