Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding the week number 1

Status
Not open for further replies.

robcarr

Programmer
May 15, 2002
633
GB
Dear All,

I need to find a formula to find the week no., i had a file sent to me last week with week no 40 on, I need to create a text formula that will show the next/current week no. i was thinking it would be similar to =text(now(),"dd"), but I am not sure, as I need this to locate the file I am using in VBA, as all the files have the week no. at the end of the file name, and I need to open the most recent week no each time the report is run, which is weekly.

Any help greatly appreciated.

 
The next/current week number would be

Code:
nxtWeekNo = Format(Now(), "ww") + 1
curWeekNo = Format(Now(), "ww")

dwilson01
 
if date is in cell A1 then in b1 =WEEKNUM(A1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top