Welcome to Dream.In.Code
Become a VB Expert!

Join 149,551 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,589 people online right now. Registration is fast and FREE... Join Now!




Excel Date/week Help

 
Reply to this topicStart new topic

Excel Date/week Help

KG87
23 Nov, 2007 - 05:19 AM
Post #1

D.I.C Head
**

Joined: 25 Sep, 2007
Posts: 52



Thanked: 2 times
My Contributions
Its not really a programming question but here goes,

I've a worksheet that works out my partners expenses (its one from the company, and very badly made)

There is a field that displays the week number (45,46,47) etc

I just wondered if there is anyway of using some form of function in Excel to automate this (so the user doesn't have to manually update)

thanks in advance

George
User is offlineProfile CardPM
+Quote Post

SilentCodingOne
RE: Excel Date/week Help
26 Nov, 2007 - 01:05 PM
Post #2

D.I.C Head
**

Joined: 8 Nov, 2007
Posts: 63


My Contributions
QUOTE(KG87 @ 23 Nov, 2007 - 06:19 AM) *

Its not really a programming question but here goes,

I've a worksheet that works out my partners expenses (its one from the company, and very badly made)

There is a field that displays the week number (45,46,47) etc

I just wondered if there is anyway of using some form of function in Excel to automate this (so the user doesn't have to manually update)

thanks in advance

George


You should be able to use the WEEKNUM function in Excel. Basically it will return the week number within the current year based on a date provided in the spreadsheet.

CODE

=WEEKNUM(A2,1)


A2 would represent the cell location that contains the date and the 1 would be for which day of the week to consider the starting point. In this case, the 1 says to use Sunday as the start of the week. A 2 would be Monday, 3 a Tuesday, etc.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 09:48PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month