Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
WEEKNUM Question
Hi,
In my company, 2004 has 53 weeks so Week 1 of 2005 is January 2nd. I am trying to create a formula that checks the last number of the year like so (D( is a date in the form of 1/1/2005): =IF((RIGHT(D9)=5),(WEEKNUM(D9,1)-1),WEEKNUM(D9,1)) But the problem is, RIGHT(D9) gives me a 0??? Any ideas?? Thank you in advance. Rusty |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
WEEKNUM Question
Hi
you can't use text functions on a date value try =IF(RIGHT(TEXT(D9,"YYYY"),1)="5",WEEKNUM(D9,1)-1,WEEKNUM(D9,1)) -- Regards Frank Kabel Frankfurt, Germany "RustyR" schrieb im Newsbeitrag ... Hi, In my company, 2004 has 53 weeks so Week 1 of 2005 is January 2nd. I am trying to create a formula that checks the last number of the year like so (D( is a date in the form of 1/1/2005): =IF((RIGHT(D9)=5),(WEEKNUM(D9,1)-1),WEEKNUM(D9,1)) But the problem is, RIGHT(D9) gives me a 0??? Any ideas?? Thank you in advance. Rusty |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
WEEKNUM Question
Hi,
Use this formula...It converts the year in D9 to text then takes the right character, the five. =RIGHT(TEXT(D9,"YYYY"),1) Hope it helps. Eloy "RustyR" wrote: Hi, In my company, 2004 has 53 weeks so Week 1 of 2005 is January 2nd. I am trying to create a formula that checks the last number of the year like so (D( is a date in the form of 1/1/2005): =IF((RIGHT(D9)=5),(WEEKNUM(D9,1)-1),WEEKNUM(D9,1)) But the problem is, RIGHT(D9) gives me a 0??? Any ideas?? Thank you in advance. Rusty |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
WEEKNUM Question
On Fri, 22 Oct 2004, Eloy wrote:
Use this formula...It converts the year in D9 to text then takes the right character, the five. =RIGHT(TEXT(D9,"YYYY"),1) That would work, but not the way I would do it. I'd use: =MOD(YEAR(D9),10) Don <donwiss at panix.com. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
WEEKNUM() Question | Excel Worksheet Functions | |||
weeknum gone ?? | Excel Worksheet Functions | |||
Weeknum | Excel Worksheet Functions | |||
WEEKNUM() | Excel Discussion (Misc queries) | |||
WeekNum ISO | Excel Worksheet Functions |