Count dates to show week number sequence

rashid67

New Member
Joined
Oct 22, 2013
Messages
14
Hello,

I am looking for a formula to show "Wk 1" for seven consecutive dates and than show "Wk 2" and so on till the end of the year date. The example is shown below. In this case the fiscal year starts from Feb 01 of current year and end Jan 31 of the following year, this is a retail calendar.

I would appreciate help from any one....

Thanks,
RJ

DateWeek
02:01:2017Wk 1
02:02:2017Wk 1
02:03:2017Wk 1
02:04:2017Wk 1
02:05:2017Wk 1
02:06:2017Wk 1
02:07:2017Wk 1
02:08:2017Wk 2
02:09:2017Wk 2
02:10:2017Wk 2
02:11:2017Wk 2
02:12:2017Wk 2
02:13:2017Wk 2
02:14:2017Wk 2
02:15:2017Wk 3

<tbody>
</tbody>
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
01-Feb-17Wk 1
02-Feb-17Wk 1
03-Feb-17Wk 1
04-Feb-17Wk 1
05-Feb-17Wk 1
06-Feb-17Wk 1
07-Feb-17Wk 1
08-Feb-17Wk 2
09-Feb-17Wk 2this macro put in the week numbers
10-Feb-17Wk 2
11-Feb-17Wk 2I only scaled it to 6 weeks for demo purposes
12-Feb-17Wk 2
13-Feb-17Wk 2no doubt you have special rules for extra days in week at year ends
14-Feb-17Wk 2
15-Feb-17Wk 3tot = 1
16-Feb-17Wk 3 For j = 1 To 42
17-Feb-17Wk 3 Sum = Sum + 1
18-Feb-17Wk 3 Cells(j, 2) = "Wk " & tot
19-Feb-17Wk 3 If Sum = 7 Then Sum = 0: tot = tot + 1
20-Feb-17Wk 3 Next j
21-Feb-17Wk 3End Sub
22-Feb-17Wk 4
23-Feb-17Wk 4
24-Feb-17Wk 4
25-Feb-17Wk 4
26-Feb-17Wk 4
27-Feb-17Wk 4
28-Feb-17Wk 4
01-Mar-17Wk 5
02-Mar-17Wk 5
03-Mar-17Wk 5
04-Mar-17Wk 5
05-Mar-17Wk 5
06-Mar-17Wk 5
07-Mar-17Wk 5
08-Mar-17Wk 6
09-Mar-17Wk 6
10-Mar-17Wk 6
11-Mar-17Wk 6
12-Mar-17Wk 6
13-Mar-17Wk 6
14-Mar-17Wk 6

<colgroup><col><col span="16"></colgroup><tbody>
</tbody>
 
Upvote 0
That is an odd looking date format. Are your dates entered as dates, and just formatted with a special custom format, or are they entered as strings?
And what row is the first date (February 2) appearing on?
 
Upvote 0
That is an odd looking date format. Are your dates entered as dates, and just formatted with a special custom format, or are they entered as strings?
And what row is the first date (February 2) appearing on?

dates are in date format: mm:dd:yyyy
February 2 is on row 3 (A3)
 
Upvote 0
Enter this formula in B3 and copy down.
Code:
="Wk " & INT((A3-$A$3)/7)+1
 
Upvote 0

Forum statistics

Threads
1,216,730
Messages
6,132,398
Members
449,725
Latest member
Enero1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top