Week Quarter Year - Custom Week

footballdj123

New Member
Joined
Apr 5, 2018
Messages
8
Hello,

I want to be able to look at a date and then return a Week Quarter and Year. The custom week goes from Thurs - Weds.

There is a standard return of week number and quarter but I can't figure out how to change that for custom week.

So far I am just doing a lookup to a custom file.

<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}@page {margin:.75in .7in .75in .7in; mso-header-margin:.3in; mso-footer-margin:.3in;}tr {mso-height-source:auto;}col {mso-width-source:auto;}br {mso-data-placement:same-cell;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:black; font-size:12.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Calibri, sans-serif; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}.xl65 {color:windowtext; font-size:10.0pt; font-family:Arial, sans-serif; mso-font-charset:0; mso-number-format:"Short Date";}.xl66 {color:windowtext; font-size:10.0pt; font-family:Arial, sans-serif; mso-font-charset:0;}--></style>[TABLE="width: 261"]
<!--StartFragment--> <colgroup><col width="87" span="3" style="width:65pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 87, align: right"]1/1/18[/TD]
[TD="class: xl66, width: 87"]Week 1[/TD]
[TD="width: 87"]Q1 2018[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1/2/18[/TD]
[TD]Week 1[/TD]
[TD]Q1 2018[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1/3/18[/TD]
[TD]Week 1[/TD]
[TD]Q1 2018[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1/4/18[/TD]
[TD]Week 1[/TD]
[TD]Q1 2018[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1/5/18[/TD]
[TD="class: xl66"]Week 2[/TD]
[TD]Q1 2018[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1/6/18[/TD]
[TD="class: xl66"]Week 2[/TD]
[TD]Q1 2018[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1/7/18[/TD]
[TD="class: xl66"]Week 2[/TD]
[TD]Q1 2018[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1/8/18[/TD]
[TD="class: xl66"]Week 2[/TD]
[TD]Q1 2018[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1/9/18[/TD]
[TD="class: xl66"]Week 2[/TD]
[TD]Q1 2018[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1/10/18[/TD]
[TD="class: xl66"]Week 2[/TD]
[TD]Q1 2018[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1/11/18[/TD]
[TD="class: xl66"]Week 2[/TD]
[TD]Q1 2018[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1/12/18[/TD]
[TD="class: xl66"]Week 3[/TD]
[TD]Q1 2018[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1/13/18[/TD]
[TD="class: xl66"]Week 3[/TD]
[TD]Q1 2018[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1/14/18[/TD]
[TD="class: xl66"]Week 3[/TD]
[TD]Q1 2018[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1/15/18[/TD]
[TD="class: xl66"]Week 3[/TD]
[TD]Q1 2018[/TD]
[/TR]
<!--EndFragment--></tbody>[/TABLE]
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi,

I'm not sure if I understand what you're asking, are you looking for a formula to give you the Week Number based on your Custom Week?
If you are, your description says Thurs - Wed, but your sample shows Friday - Thurs, below is formula based on your sample:


Excel 2010
ABC
1DateWeek #Quarter
21/1/20181Q1 2018
31/2/20181Q1 2018
41/3/20181Q1 2018
51/4/20181Q1 2018
61/5/20182Q1 2018
71/6/20182Q1 2018
81/7/20182Q1 2018
91/8/20182Q1 2018
101/9/20182Q1 2018
111/10/20182Q1 2018
121/11/20182Q1 2018
131/12/20183Q1 2018
141/13/20183Q1 2018
151/14/20183Q1 2018
161/15/20183Q1 2018
Sheet11
Cell Formulas
RangeFormula
B2=WEEKNUM(A2,15)


B2 formula copied down.
 
Upvote 0
If you Also need a formula for the Quarter/Year Column as shown in your sample, again week starts on Fridays:


Excel 2010
ABC
1DateWeek #Quarter/Year
21/1/20181Q1 2018
31/2/20181Q1 2018
41/3/20181Q1 2018
51/4/20181Q1 2018
61/5/20182Q1 2018
71/6/20182Q1 2018
81/7/20182Q1 2018
91/8/20182Q1 2018
101/9/20182Q1 2018
111/10/20182Q1 2018
121/11/20182Q1 2018
131/12/20183Q1 2018
141/13/20183Q1 2018
151/14/20183Q1 2018
161/15/20183Q1 2018
173/25/201813Q1 2018
184/15/201816Q2 2018
197/26/201830Q3 2018
2010/21/201843Q4 2018
Sheet11
Cell Formulas
RangeFormula
B2=WEEKNUM(A2,15)
C2=LOOKUP(B2,{1,14,27,40},{"Q1","Q2","Q3","Q4"})&" "&YEAR(A2)


B2 and C2 formulas copied down.
 
Upvote 0
Thanks and if I wanted to change it to Thursday - Weds, how would I go about doing that?

Change the B2 formula from 15 to 14:


Book1
ABC
1DateWeek #Quarter/Year
21/1/20181Q1 2018
31/2/20181Q1 2018
41/3/20181Q1 2018
51/4/20182Q1 2018
61/5/20182Q1 2018
71/6/20182Q1 2018
81/7/20182Q1 2018
91/8/20182Q1 2018
101/9/20182Q1 2018
111/10/20182Q1 2018
121/11/20183Q1 2018
131/12/20183Q1 2018
141/13/20183Q1 2018
151/14/20183Q1 2018
161/15/20183Q1 2018
173/25/201813Q1 2018
184/15/201816Q2 2018
197/26/201831Q3 2018
2010/21/201843Q4 2018
2112/31/201853Q4 2018
Sheet11
Cell Formulas
RangeFormula
B2=WEEKNUM(A2,14)
C2=LOOKUP(B2,{1,14,27,40},{"Q1","Q2","Q3","Q4"})&" "&YEAR(A2)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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