View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Eloy[_2_] Eloy[_2_] is offline
external usenet poster
 
Posts: 8
Default 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