simple reference changing weekly?

WadeWatts

New Member
Joined
Oct 12, 2023
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am trying to pull a week data through from one worksheet to another based on current work week.
1697492075854.png


example of what im trying to do.
range C5:Q8 is manual input,
range C15:G18 is auto pulled through based on this week number.

this week is week 42, so today() falls within the week, so range C15:G18 shows the data from the input range,
next week when i opened the sheet, today() will be in week 43, i want the weeks data to be pulled through

initially i wrote =if(and(b5=b15,$c$13=weeknum(today())),c5)
seemed to work to pull through but i cant figure out the date to move


any ideas?

thanks
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
The formula can probably be made more efficient, but this seems to work. but, I'm not sure you want a count of absences or just to see another "L".
This is assuming weeknumbers start on Sunday (Option 1 for 2nd argument of weeknumber), I used a hard coded date for the formula instead of TODAY() so I could change it as needed.

Mr excel questions 67.xlsm
ABCDEFGHIJKLMNOPQR
1
2
3Week Nbr424242424243434343434444444444
42023-10-162023-10-172023-10-182023-10-192023-10-202023-10-232023-10-242023-10-252023-10-262023-10-272023-10-302023-10-312023-11-012023-11-022023-11-03
5daveLL
6tonyLLL
7mattLLL
8pabloL
9
10
112023-10-23Target Date
1243today()
13week nbr
14This weekMonTuesWedThuFri
15dave00101
16tony01000
17matt00001
18pablo10000
19
WadeWatts
Cell Formulas
RangeFormula
H3:Q3H3=C3+1
D4:Q4D4=WORKDAY.INTL(C4,1,1)
A12A12=WEEKNUM($A$11,1)
C15:G18C15=--(DROP(FILTER(HSTACK($B$5:$B$8,DROP(FILTER($C$3:$Q$8,$C$3:$Q$3=$A$12),2)),$B15=$B$15:$B$18),,1)="L")
Dynamic array formulas.
 
Upvote 0
thanks for the reply.
I am looking for whatever is in the cell to be returned, including blanks, the L in the example is a reference to a location that team member is going to be, so could be a multitude of different letters.
and i was hoping to use the Today() rather than hard coded so it always pulls the relevant week through.

this example is just a small snippet of what im trying to do, the real thing has a large team and a 12 month look ahead, people put in leave etc on this, so im looking at being able to open it any day and see the returned week

thanks again,
 
Upvote 0
How about
Fluff.xlsm
ABCDEFGHIJKLMNOPQ
1
2
3Week Nbr424242424243434343434444444444
416/10/202317/10/202318/10/202319/10/202320/10/202323/10/202324/10/202325/10/202326/10/202327/10/202330/10/202331/10/202301/11/202302/11/202303/11/2023
5daveLL
6tonyLLL
7mattLLL
8pabloL
9
10
11
12
13week nbr42
14This weekMonTuesWedThuFri
15dave 
16tonyL
17matt LL
18pablo 
Sheet5
Cell Formulas
RangeFormula
C13C13=WEEKNUM(TODAY())
C15:G18C15=FILTER(FILTER($C$5:$Q$8&"",$B$5:$B$8=B15),$C$3:$Q$3=$C$13)
Dynamic array formulas.
 
Upvote 0
In C13
Excel Formula:
=WEEKNUM(TODAY())
IN C15
Excel Formula:
=LET(a,INDEX($C$5:$Q$8,MATCH($B15:$B18,$B$5:$B$8,0),MATCH($C$13,$C$3:$Q$3,0)+COLUMN($C15:$G15)-COLUMN($C$15)),IF(a="","",a))
 
Upvote 0
How about
thanks for the input, appreciate it, on the version of windows im building this on, Filter isnt available to me, only filterxml, and when i tried to use the substitute your formula filter with filterxml, it just returns !VALUE#,
 
Upvote 0
Your profile shows you are using 365, if you need a formula that will work in older version you need to let us know.
What version does this need to work in?
 
Upvote 0
Your profile shows you are using 365, if you need a formula that will work in older version you need to let us know.
What version does this need to work in?
apologies, youre right, my MrExcel account is set up on my "Work" laptop, which has 365, I forgot to mention the issue I am working on is on a clients machine, which is pretty locked down,
the instance of excel i am currently working with is office professional plus 2016
 
Upvote 0
Ok, how about
Fluff.xlsm
ABCDEFGHIJKLMNOPQ
1
2
3Week Nbr424242424243434343434444444444
416/10/202317/10/202318/10/202319/10/202320/10/202323/10/202324/10/202325/10/202326/10/202327/10/202330/10/202331/10/202301/11/202302/11/202303/11/2023
5daveLL
6tonyLLL
7mattLLL
8pabloL
9
10
11
12
13week nbr42
14This weekMonTuesWedThuFri
15dave00000
16tonyL0000
17matt0L0L0
18pablo00000
Sheet5
Cell Formulas
RangeFormula
C13C13=WEEKNUM(TODAY())
C15:G18C15=INDEX(INDEX($C$5:$Q$8,MATCH($B15,$B$5:$B$8,0),0),MATCH($C$13,$C$3:$Q$3,0)+COLUMNS($C15:C15)-1)
 
Upvote 0
Solution

Forum statistics

Threads
1,224,747
Messages
6,180,714
Members
452,995
Latest member
isldboy

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