Vlookup with changing last week date

starheartbeam

New Member
Joined
Aug 8, 2018
Messages
18
I have a very large excel file that I create every Monday. Many of these tabs have where i am looking at current week and last weeks information. For last week I am looking up from last weeks file. This is a very manual and slow process to have to go change the date for last week each week. Is there any way I can get this date part in the vlookup to pull from another column so I only have to change the date in one place?
Here is an example of one of the tabs.

1631561385866.png

And here is the vlookup I use as an example:
=VLOOKUP(B3,'C:\Inventory\Inventory Indicators\[Inventory Indicators 2021 (09-06).xlsm]OBJ DATA'!$B:$D,3,FALSE)

How can I get (09-06) to be pulled from another place in my current file that I only have to change in one place or always be current weeks date - 7 days
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

earthworm

Well-known Member
Joined
May 19, 2009
Messages
619
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Are you taking about picking value within same workbook or different workbook.

If you want to pick value from same workbook you can use indirect function to pick values based on cell.
 

starheartbeam

New Member
Joined
Aug 8, 2018
Messages
18
Are you taking about picking value within same workbook or different workbook.

If you want to pick value from same workbook you can use indirect function to pick values based on cell.
I am not sure indirect will work for me. Each Monday I create this file and look at last weeks file to get what last weeks numbers are.
So for example this week the vlookup looks like this:
=VLOOKUP(B3,'C:\Inventory\Inventory Indicators\[Inventory Indicators 2021 (09-06).xlsm]OBJ DATA'!$B:$D,3,FALSE)
but next week it will look like this:
=VLOOKUP(B3,'C:\Inventory\Inventory Indicators\[Inventory Indicators 2021 (09-13).xlsm]OBJ DATA'!$B:$D,3,FALSE)
and so on and so forth but every week I have to go in and change that date (so 09-06 to 09-13 to 09-20)
and this is very manual and it is on lots of sheets and I was wondering if there was a way to do this without having to do it manually each week.
 

Forum statistics

Threads
1,147,559
Messages
5,741,817
Members
423,689
Latest member
Jords998

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
Top