Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 58
Default Inverse to WEEKNUM

I know that using the function WEEKNUM you can get the number for a week
through a year

eg. =WEEKNUM(09/29/2008) gets 40

my question is
can it be done backwards??

what i want to do is
type the number of the week (A1)
and get the date of the monday of that week (on B1)

ie
if i type 41
i should get 10/06/2008
(the date of the monday of week 41)


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,696
Default Inverse to WEEKNUM

Maybe not the prettiest thing, but if you put 1/1/08 in B1 and 40 in A1,

=IF(WEEKDAY(B1+A1*7,1)=2,WEEKDAY(B1+A1*7,1),WEEKDA Y(B1+A1*7,1)-WEEKDAY(B1+A1*7,1)+2)

should get you there.

"Alonso" wrote:

I know that using the function WEEKNUM you can get the number for a week
through a year

eg. =WEEKNUM(09/29/2008) gets 40

my question is
can it be done backwards??

what i want to do is
type the number of the week (A1)
and get the date of the monday of that week (on B1)

ie
if i type 41
i should get 10/06/2008
(the date of the monday of week 41)


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Inverse to WEEKNUM

=DATE(YEAR(TODAY()),1,1)-WEEKDAY(DATE(YEAR(TODAY()),1,1))+7*(A2-1)+2
but note that in some years, such as this, there isn't a Monday in week 1
(as it's actually week 53 of the previous year).
--
David Biddulph

"Alonso" wrote in message
...
I know that using the function WEEKNUM you can get the number for a week
through a year

eg. =WEEKNUM(09/29/2008) gets 40

my question is
can it be done backwards??

what i want to do is
type the number of the week (A1)
and get the date of the monday of that week (on B1)

ie
if i type 41
i should get 10/06/2008
(the date of the monday of week 41)




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Inverse to WEEKNUM

=DATE(YEAR(TODAY()),1,1)-8+(A1)*7


"Alonso" wrote:

I know that using the function WEEKNUM you can get the number for a week
through a year

eg. =WEEKNUM(09/29/2008) gets 40

my question is
can it be done backwards??

what i want to do is
type the number of the week (A1)
and get the date of the monday of that week (on B1)

ie
if i type 41
i should get 10/06/2008
(the date of the monday of week 41)




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Inverse to WEEKNUM

Hi Mama
I am curious to know why you deducted 8 in the formula
--
cprao


"Teethless mama" wrote:

=DATE(YEAR(TODAY()),1,1)-8+(A1)*7


"Alonso" wrote:

I know that using the function WEEKNUM you can get the number for a week
through a year

eg. =WEEKNUM(09/29/2008) gets 40

my question is
can it be done backwards??

what i want to do is
type the number of the week (A1)
and get the date of the monday of that week (on B1)

ie
if i type 41
i should get 10/06/2008
(the date of the monday of week 41)


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Inverse to WEEKNUM

The 8 is OK for 2008, but not for other years.
See other formulae suggested.
--
David Biddulph

"cprao" wrote in message
...
Hi Mama
I am curious to know why you deducted 8 in the formula
--
cprao


"Teethless mama" wrote:

=DATE(YEAR(TODAY()),1,1)-8+(A1)*7


"Alonso" wrote:

I know that using the function WEEKNUM you can get the number for a
week
through a year

eg. =WEEKNUM(09/29/2008) gets 40

my question is
can it be done backwards??

what i want to do is
type the number of the week (A1)
and get the date of the monday of that week (on B1)

ie
if i type 41
i should get 10/06/2008
(the date of the monday of week 41)




  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 58
Default Inverse to WEEKNUM

as Don says
looks like the best one

and above all
it worked perfectly

thanks!!


"Teethless mama" wrote:

=DATE(YEAR(TODAY()),1,1)-8+(A1)*7


"Alonso" wrote:

I know that using the function WEEKNUM you can get the number for a week
through a year

eg. =WEEKNUM(09/29/2008) gets 40

my question is
can it be done backwards??

what i want to do is
type the number of the week (A1)
and get the date of the monday of that week (on B1)

ie
if i type 41
i should get 10/06/2008
(the date of the monday of week 41)


  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Inverse to WEEKNUM

.... providing that YEAR(TODAY()) is 2008, so in that case you could use
=DATE(2008,1,1)-8+(A1)*7

For other years, you need one of the other formulae suggested (or alter
the -8 parameter).
--
David Biddulph

"Alonso" wrote in message
...
as Don says
looks like the best one

and above all
it worked perfectly

thanks!!


"Teethless mama" wrote:

=DATE(YEAR(TODAY()),1,1)-8+(A1)*7


"Alonso" wrote:

I know that using the function WEEKNUM you can get the number for a
week
through a year

eg. =WEEKNUM(09/29/2008) gets 40

my question is
can it be done backwards??

what i want to do is
type the number of the week (A1)
and get the date of the monday of that week (on B1)

ie
if i type 41
i should get 10/06/2008
(the date of the monday of week 41)






  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 58
Default Inverse to WEEKNUM

thanks for the remark David

i noticed that your formula is similar
I'll keep both, just to track any changes



"David Biddulph" wrote:

.... providing that YEAR(TODAY()) is 2008, so in that case you could use
=DATE(2008,1,1)-8+(A1)*7

For other years, you need one of the other formulae suggested (or alter
the -8 parameter).
--
David Biddulph

"Alonso" wrote in message
...
as Don says
looks like the best one

and above all
it worked perfectly

thanks!!


"Teethless mama" wrote:

=DATE(YEAR(TODAY()),1,1)-8+(A1)*7


"Alonso" wrote:

I know that using the function WEEKNUM you can get the number for a
week
through a year

eg. =WEEKNUM(09/29/2008) gets 40

my question is
can it be done backwards??

what i want to do is
type the number of the week (A1)
and get the date of the monday of that week (on B1)

ie
if i type 41
i should get 10/06/2008
(the date of the monday of week 41)





  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 58
Default Inverse to WEEKNUM

David

for year 2009
what changes should be made to the formulas
either your's or mama's


"David Biddulph" wrote:

.... providing that YEAR(TODAY()) is 2008, so in that case you could use
=DATE(2008,1,1)-8+(A1)*7

For other years, you need one of the other formulae suggested (or alter
the -8 parameter).
--
David Biddulph

"Alonso" wrote in message
...
as Don says
looks like the best one

and above all
it worked perfectly

thanks!!


"Teethless mama" wrote:

=DATE(YEAR(TODAY()),1,1)-8+(A1)*7


"Alonso" wrote:

I know that using the function WEEKNUM you can get the number for a
week
through a year

eg. =WEEKNUM(09/29/2008) gets 40

my question is
can it be done backwards??

what i want to do is
type the number of the week (A1)
and get the date of the monday of that week (on B1)

ie
if i type 41
i should get 10/06/2008
(the date of the monday of week 41)





  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Inverse to WEEKNUM

My original reply

will work for 2009, as for other years.
--
David Biddulph

"Alonso" wrote in message
...
David

for year 2009
what changes should be made to the formulas
either your's or mama's


"David Biddulph" wrote:

.... providing that YEAR(TODAY()) is 2008, so in that case you could use
=DATE(2008,1,1)-8+(A1)*7

For other years, you need one of the other formulae suggested (or alter
the -8 parameter).
--
David Biddulph

"Alonso" wrote in message
...
as Don says
looks like the best one

and above all
it worked perfectly

thanks!!


"Teethless mama" wrote:

=DATE(YEAR(TODAY()),1,1)-8+(A1)*7


"Alonso" wrote:

I know that using the function WEEKNUM you can get the number for a
week
through a year

eg. =WEEKNUM(09/29/2008) gets 40

my question is
can it be done backwards??

what i want to do is
type the number of the week (A1)
and get the date of the monday of that week (on B1)

ie
if i type 41
i should get 10/06/2008
(the date of the monday of week 41)







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
Is there a way to do an inverse two-way lookup? car guy Excel Discussion (Misc queries) 10 July 3rd 09 07:48 PM
TAN INVERSE ? Ahsan Excel Worksheet Functions 3 June 19th 07 04:09 PM
Inverse rank SteveC Excel Discussion (Misc queries) 6 May 3rd 06 06:18 PM
log inverse Az Excel Discussion (Misc queries) 1 November 28th 05 09:12 AM
Inverse sin John Fitzpatrick Excel Worksheet Functions 3 March 25th 05 06:35 PM


All times are GMT +1. The time now is 01:11 AM.

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"