Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default WEEKNUM calculations for week stating with Tuesday

While calculating WEEKNUM stating from Tuesday to Friday i am getting error
massage #NUM# but for week staring from Sunday and Monday it calculating
correctly. What could be the reason and how to work around it correctly.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default WEEKNUM calculations for week stating with Tuesday

Maybe

=IF(WEEKDAY(A1,2)1,WEEKNUM(A1,2)+1,WEEKNUM(A1,2))

Mike

"P C Verma" wrote:

While calculating WEEKNUM stating from Tuesday to Friday i am getting error
massage #NUM# but for week staring from Sunday and Monday it calculating
correctly. What could be the reason and how to work around it correctly.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default WEEKNUM calculations for week stating with Tuesday

There is no known place in the world where week starts with Tuesday-Friday,
therefore Excel doesn't have this feature. What do you want to do?

Regards,
Stefi

€˛P C Verma€¯ ezt Ć*rta:

While calculating WEEKNUM stating from Tuesday to Friday i am getting error
massage #NUM# but for week staring from Sunday and Monday it calculating
correctly. What could be the reason and how to work around it correctly.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default WEEKNUM calculations for week stating with Tuesday

What is your formula? What values are in the cells leading into the
formula? What value did you get as a result? What value did you expect?
What formula is working correctly for what data?
--
David Biddulph

"P C Verma" <P C wrote in message
...
While calculating WEEKNUM stating from Tuesday to Friday i am getting
error
massage #NUM# but for week staring from Sunday and Monday it calculating
correctly. What could be the reason and how to work around it correctly.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default WEEKNUM calculations for week stating with Tuesday

I'm guessing you haven't heard of the "4-day work week" that many companies
have already adopted? One of the methods of implementing this schedule is to
give the workers Monday off in conjunction with the normal weekend.

Rick


"Stefi" wrote in message
...
There is no known place in the world where week starts with
Tuesday-Friday,
therefore Excel doesn't have this feature. What do you want to do?

Regards,
Stefi

€˛P C Verma€¯ ezt Ć*rta:

While calculating WEEKNUM stating from Tuesday to Friday i am getting
error
massage #NUM# but for week staring from Sunday and Monday it calculating
correctly. What could be the reason and how to work around it correctly.


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default WEEKNUM calculations for week stating with Tuesday

If you don't mind using a User Defined Function (UDF), then here is a method
that creates the worksheet function you want. Keyin Alt+F11 to go to the VB
editor and click on Insert/Module on the menu bar there. Copy/Paste this
code into the code window that appeared when you did that...

Function WeekNumber(D As Date) As Long
If D = 0 Then
WeekNumber = 0
Else
WeekNumber = DatePart("ww", D, vbTuesday, vbFirstJan1)
End If
End Function

Now, back on your work sheet... assuming, say, C3 contains a date, put this
in any other cell...

=WeekNumber(C3)

and it will display the week number you want given the Tuesday start of week
(using the same start of year that the WEEKNUM function uses).

Rick


"P C Verma" <P C wrote in message
...
While calculating WEEKNUM stating from Tuesday to Friday i am getting
error
massage #NUM# but for week staring from Sunday and Monday it calculating
correctly. What could be the reason and how to work around it correctly.


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default WEEKNUM calculations for week stating with Tuesday

You are right, but in this case Excel is behind the developments in the
world. Does Excel2007 have this feature?

Regards,
Stefi

€˛Rick Rothstein (MVP - VB)€¯ ezt Ć*rta:

I'm guessing you haven't heard of the "4-day work week" that many companies
have already adopted? One of the methods of implementing this schedule is to
give the workers Monday off in conjunction with the normal weekend.

Rick


"Stefi" wrote in message
...
There is no known place in the world where week starts with
Tuesday-Friday,
therefore Excel doesn't have this feature. What do you want to do?

Regards,
Stefi

€˛P C Verma€¯ ezt Ć*rta:

While calculating WEEKNUM stating from Tuesday to Friday i am getting
error
massage #NUM# but for week staring from Sunday and Monday it calculating
correctly. What could be the reason and how to work around it correctly.



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
Comparing & Stating The Nearest Matching FARAZ QURESHI Excel Discussion (Misc queries) 2 April 11th 08 07:01 AM
Rolling 12 week calculations Throwme A Frigginbone Excel Worksheet Functions 2 January 9th 07 09:37 AM
start/end dates of a week given just the weeknum() value David Excel Discussion (Misc queries) 4 December 12th 05 03:29 PM
reverse week count calculations klillestol Excel Worksheet Functions 1 July 21st 05 11:41 PM
weeknum function says jan1=week1, mod to first 4 day week needed sam Excel Discussion (Misc queries) 3 June 13th 05 04:05 PM


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