Should be easy

M

Michell Major

=IF(AND(A4>="4/12/2006",A4<="9/12/2006"),"49")

This should show next week as 'Week 49' but doesn't. I want to add another
three IF to this string so that I can get the month sorted out in Week order?
 
R

Roger Govier

Hi

Why not just the weeknum function?
=WEEKNUM(A1)

For this to work you need Analysis Toolpak. Tools>Addins>Click Analysis
Toolpak.
 
M

Max

=IF(AND(A4>="4/12/2006",A4<="9/12/2006"),"49")

Try it as:
=IF(AND(A4>=--"4/12/2006",A4<=--"9/12/2006"),49)
 
M

macropod

Hi Michell Major,

=INT((A4-DATE(YEAR(A4),1,1))/7+1)
returns '49' for "3/12/2006">=A4<="9/12/2006" - a span of 7 days/1 week.

I don't understand the bit about the month, though.

Cheers
PS: 31/12/2006 will be the 1st day in week 53.

--
macropod
[MVP - Microsoft Word]


Michell Major said:
=IF(AND(A4>="4/12/2006",A4<="9/12/2006"),"49")

This should show next week as 'Week 49' but doesn't. I want to add another
three IF to this string so that I can get the month sorted out in Week
order?
 
M

Michell Major

Roger

Fantastic!

Dan

Roger Govier said:
Hi

Why not just the weeknum function?
=WEEKNUM(A1)

For this to work you need Analysis Toolpak. Tools>Addins>Click Analysis
Toolpak.
 
M

macropod

Hi Michell Major,

One thing to be aware of if other people are likely to use this workbook on
other systems is that they'll need to have the Analysis Toolpak installed
too, otherwise the WEEKNUM function won't work for them and they'll get no
warnings about it, either.

Cheers
 
M

Max

No prob. Go with Roger's much more apt response. Me?, was just focusing on
getting your attempt to work "as-is" <g>
 
Top