Formula to change selected week number and show the month

Lukma

Board Regular
Joined
Feb 12, 2020
Messages
240
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hi Guys

I was trying to something and i really don't no how to go about it, so if there is anyone that can help with this

i have enter a serial number using it as week number for every month so 1 to 53 Number which make it a full year, so i need formula that will enter the number of it will change to the exact month

so i need the month to change immediately i enter a value number in column B then the month change. is there any formula that could solve this

ILSP_Performance Tracking Data.xlsx
BC
1Wk No.Month
21Jan-21
32Jan-21
43Jan-21
54Jan-21
65Feb-21
Sheet3
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Upvote 0
How do you determine the first week? Is it always Jan 1 - Jan 7? Or do you start on the first Monday of the year or something? How do you want to handle weeks that span 2 months? First day of week or last?

Assuming week 1 is Jan 1-Jan 7, and you want the month of the first day of the week, try this:

Book1
AB
1Wk No.Month
21Jan-21
32Jan-21
43Jan-21
54Jan-21
65Jan-21
76Feb-21
87Feb-21
98Feb-21
109Feb-21
1110Mar-21
1211Mar-21
Sheet7
Cell Formulas
RangeFormula
B2:B12B2=DATE(YEAR(TODAY()),1,A2*7-6)
 
Upvote 0
Dear Eris W

Thanks with the formula easy and simple,

Actual i was trying to find the average for each week by doing the so once i click the dropdown week number in column S1 then in column T2 will change to get the average but i guess your formula helps out
But if you feel it ok just the way i use it to find the average please do let me know or you could just assist if there is more better ways

ILSP_Performance Tracking Data.xlsx
NOPQRSTU
1Month Wk- NoDate & Time Date & Time Hrs 1Month YES
201-Jan-215331/12/20 21:3401/01/21 00:503:16YESJan-21
301-Jan-215331/12/20 19:0931/12/20 23:003:51NOAverage Wekly
401-Jan-215331/12/20 22:0801/01/21 11:3013:22NO9:25
501-Jan-21101/01/21 04:1401/01/21 01:15-02:59NO
601-Jan-215331/12/20 23:0001/01/21 08:309:30YES
701-Jan-21101/01/21 11:3001/01/21 05:20-06:10YES
801-Jan-21101/01/21 05:0501/01/21 15:0910:04YES
901-Jan-21101/01/21 04:4501/01/21 09:455:00YES
1001-Jan-21101/01/21 09:5801/01/21 08:05-01:53YES
1101-Jan-21102/01/21 12:3901/01/21 13:50-22:49YES
1201-Jan-21102/01/21 20:3502/01/21 16:00-04:35YES
1301-Jan-21101/01/21 19:0503/01/21 00:1529:10YES
1401-Jan-21101/01/21 17:0602/01/21 00:006:54NO
1501-Jan-21102/01/21 04:4401/01/21 21:40-07:04NO
1601-Jan-21101/01/21 21:0002/01/21 08:3011:30YES
1701-Jan-21102/01/21 05:5202/01/21 01:00-04:52NO
1801-Jan-21101/01/21 19:1402/01/21 10:2515:11NO
1901-Jan-21101/01/21 19:3002/01/21 00:154:45NO
2001-Jan-21101/01/21 22:4001/01/21 23:551:15NO
2101-Jan-21101/01/21 16:3002/01/21 03:5011:20YES
2201-Jan-21102/01/21 09:3501/01/21 17:30-16:05NO
2301-Jan-21102/01/21 08:4802/01/21 13:054:17NO
2401-Jan-21203/01/21 00:4502/01/21 12:18-12:27NO
2501-Jan-21102/01/21 18:3003/01/21 04:009:30YES
2601-Jan-21203/01/21 00:4602/01/21 22:20-02:26NO
2701-Jan-21102/01/21 22:1003/01/21 04:005:50NO
2801-Jan-21102/01/21 18:2003/01/21 02:007:40YES
2901-Jan-21203/01/21 08:5002/01/21 22:30-10:20YES
3001-Jan-21203/01/21 22:3003/01/21 12:05-10:25NO
3101-Jan-21203/01/21 11:2004/01/21 02:1514:55YES
3201-Jan-21203/01/21 16:1803/01/21 18:252:07YES
3301-Jan-21203/01/21 12:4603/01/21 23:3010:44YES
3401-Jan-21203/01/21 18:1503/01/21 16:25-01:50NO
3501-Jan-21203/01/21 21:3004/01/21 02:104:40YES
3601-Jan-21203/01/21 21:1204/01/21 00:153:03YES
3701-Jan-21203/01/21 16:2004/01/21 01:409:20YES
3801-Jan-21203/01/21 17:0204/01/21 00:057:03YES
3901-Jan-21203/01/21 22:1403/01/21 23:421:28NO
4001-Jan-21204/01/21 03:4004/01/21 02:12-01:28YES
4101-Jan-21204/01/21 21:3004/01/21 16:50-04:40NO
Sheet3
Cell Formulas
RangeFormula
T2T2=DATE(YEAR(TODAY()),1,S1*7-6)
T4T4=IFERROR(AVERAGEIFS(R2:R41,S2:S41,"<>0"&U1,O2:O41,S1,N2:N41,T2),"")
O2:O41O2=IF(P2<>"",WEEKNUM(P2,1),"")
R2:R41R2=IFERROR(IF(Q2-P2<0, "-" & TEXT(ABS(Q2-P2),"hh:mm"), Q2-P2),"")
Cells with Data Validation
CellAllowCriteria
S1List=$H$3:$H$44

 
Upvote 0
As far as I can tell, your way to find the average should work. The T4 formula is possibly a bit redundant, since it checks columns N and O, and the values there are 1-1 matches, but it shouldn't hurt anything.

Let us know if you have any more questions!
 
Upvote 0
Solution
Hi Eric

Thanks so much, but am having a trouble with Column S1 and T2 whenever i click the drop down in column S1 to change the week number and to give the average of the following week this wont give any result or retain the month,
My main aim is that once i change the Week is Column S1 to give the the result for wk-1 average and then when i change to Wk2 it should be me result for Wk2 as well for same month till jan week is completed then when i change to the Wk-6 it should auto change the Month in column T2 and give me week 6 average.

I hope my explanation should be clear

Appreciate your feedback
 
Upvote 0
HI Eric

Thanks so much i feel it change the month but still am having problem with the average, whenever i change the drop down to the following week the result on T4 wont calculate or give the average.

Please can you review with this if i have made a mistake some how

Regards
 
Upvote 0
thanks Eric
it work i was missing out some few entry so i update all

Really grateful thanks so much
 
Upvote 0

Forum statistics

Threads
1,214,994
Messages
6,122,633
Members
449,092
Latest member
bsb1122

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