Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Week number date formula

Hi

I'm trying to write a formula to show the date where 20/03/2008 would show
as W3Thur and 31/03/08 would show as W5Mon and 01/04/2008 would show as
W1Tue.

I have A1= 20/03/2008 and B1= "W"&weeknum(workday(a1,0),1)/4&text
(weekday(a1),"ddd")

It currently works fine if the week number divides by 4 as a whole number,
but I don't want the fractions!

Thanks

Wendy



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Week number date formula

To get rid of the fractions, change your formula to
= "W"&INT(WEEKNUM(WORKDAY(A1,0),1)/4)&TEXT(WEEKDAY(A1),"ddd")
but 1/4/08 is still week 3, not week 1.
--
David Biddulph

"Wendy" wrote in message
...
Hi

I'm trying to write a formula to show the date where 20/03/2008 would show
as W3Thur and 31/03/08 would show as W5Mon and 01/04/2008 would show as
W1Tue.

I have A1= 20/03/2008 and B1= "W"&weeknum(workday(a1,0),1)/4&text
(weekday(a1),"ddd")

It currently works fine if the week number divides by 4 as a whole number,
but I don't want the fractions!

Thanks

Wendy





  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Week number date formula

Try this

="W"&ROUNDUP(WEEKNUM(WORKDAY(A1,0),1)/4,0)&TEXT(WEEKDAY(A1),"ddd")

--
---
HTH

Bob


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



"Wendy" wrote in message
...
Hi

I'm trying to write a formula to show the date where 20/03/2008 would show
as W3Thur and 31/03/08 would show as W5Mon and 01/04/2008 would show as
W1Tue.

I have A1= 20/03/2008 and B1= "W"&weeknum(workday(a1,0),1)/4&text
(weekday(a1),"ddd")

It currently works fine if the week number divides by 4 as a whole number,
but I don't want the fractions!

Thanks

Wendy





  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Week number date formula

Hi David

Thanks, but unfortunately that doesn't do what I want. The 1st of the month
is always W1, 2nd Monday is always W2Mon etc.
Int shows what is W4 as W3 because it rounds 3.25 down rather than up. I
need week numbers per month.

Wendy




"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
To get rid of the fractions, change your formula to
= "W"&INT(WEEKNUM(WORKDAY(A1,0),1)/4)&TEXT(WEEKDAY(A1),"ddd")
but 1/4/08 is still week 3, not week 1.
--
David Biddulph

"Wendy" wrote in message
...
Hi

I'm trying to write a formula to show the date where 20/03/2008 would
show as W3Thur and 31/03/08 would show as W5Mon and 01/04/2008 would show
as W1Tue.

I have A1= 20/03/2008 and B1= "W"&weeknum(workday(a1,0),1)/4&text
(weekday(a1),"ddd")

It currently works fine if the week number divides by 4 as a whole
number, but I don't want the fractions!

Thanks

Wendy







  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Week number date formula

Hi Guys

Neither Roundup nor Int works for every day in the month. 1st working day
of the month is always W1ddd.

My original formula only works correctly on week 3
Int formula shows weeks 2 and 3 correctly.
Roundup formula shows weeks 3 and 4 correctly.

Thanks

Wendy

"Bob Phillips" wrote in message
...
Try this

="W"&ROUNDUP(WEEKNUM(WORKDAY(A1,0),1)/4,0)&TEXT(WEEKDAY(A1),"ddd")

--
---
HTH

Bob


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



"Wendy" wrote in message
...
Hi

I'm trying to write a formula to show the date where 20/03/2008 would
show as W3Thur and 31/03/08 would show as W5Mon and 01/04/2008 would show
as W1Tue.

I have A1= 20/03/2008 and B1= "W"&weeknum(workday(a1,0),1)/4&text
(weekday(a1),"ddd")

It currently works fine if the week number divides by 4 as a whole
number, but I don't want the fractions!

Thanks

Wendy









  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Week number date formula

On Thu, 20 Mar 2008 09:02:38 -0000, "Wendy" wrote:

Hi

I'm trying to write a formula to show the date where 20/03/2008 would show
as W3Thur and 31/03/08 would show as W5Mon and 01/04/2008 would show as
W1Tue.

I have A1= 20/03/2008 and B1= "W"&weeknum(workday(a1,0),1)/4&text
(weekday(a1),"ddd")

It currently works fine if the week number divides by 4 as a whole number,
but I don't want the fractions!

Thanks

Wendy



Not sure exactly what you mean. Is Day 1 of every month W1ddd?

If so, then

="W"&INT((DAY(A1)-1)/7)+1&TEXT(A1,"ddd")

should do it.

If you mean that the first Monday is when W1 starts, then what about the days
in the month prior to the first Monday?
--ron
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Week number date formula

On Thu, 20 Mar 2008 09:02:38 -0000, "Wendy" wrote:

Hi

I'm trying to write a formula to show the date where 20/03/2008 would show
as W3Thur and 31/03/08 would show as W5Mon and 01/04/2008 would show as
W1Tue.

I have A1= 20/03/2008 and B1= "W"&weeknum(workday(a1,0),1)/4&text
(weekday(a1),"ddd")

It currently works fine if the week number divides by 4 as a whole number,
but I don't want the fractions!

Thanks

Wendy



I'm not sure of the details of your week counting method.

You wrote, "The 1st of the month
is always W1, 2nd Monday is always W2Mon"

Does that mean that, for example 1 Feb 2008 would be W1Fri?

If so, then simply:

="W"&INT((DAY(A1)-1)/7)+1&TEXT(A1,"ddd")

or do you mean something else?

--ron
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
How to return week number from date? Mike Excel Worksheet Functions 0 November 30th 06 11:28 AM
How to return week number from date? Mike Excel Worksheet Functions 0 November 30th 06 11:23 AM
How to display date as week number Steen Excel Discussion (Misc queries) 13 November 21st 06 06:36 AM
How can I calculate the week number from a date, eg 21/06/05 = 26 cel504 Excel Worksheet Functions 2 August 3rd 05 08:14 PM
I need week number in excell from a date, first week must be mini. jPeich Excel Discussion (Misc queries) 4 January 5th 05 01:21 AM


All times are GMT +1. The time now is 12:33 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"