Path Variable in Formula

JLouis

Active Member
Joined
Jan 1, 2004
Messages
295
Office Version
  1. 365
Platform
  1. Windows
I have a VLOOKUP formula in a worksheet as follows:
"=VLOOKUP("Total Disc / Coup",'M:\Dropbox\1 Administration\NEW MONTHLY EXTENSIONS 2022\MONTHLY GL\7\[276.dsr.xls]Sheet1'!$A$1:$P$22,9,FALSE)"
I've created a named cell reference on another sheet names "periodx" where the number 7 is located but the number changes based on the month. I'm looking for help writing the formula to use the correct numbered reference depending on the month such as:
"=VLOOKUP("Total Disc / Coup",'M:\Dropbox\1 Administration\NEW MONTHLY EXTENSIONS 2022\MONTHLY GL\"& periodx &"\[276.dsr.xls]Sheet1'!$A$1:$P$22,9,FALSE)"

Thank you in advance.
 
It does have a formula in it, but I can get the number directly entered upon opening. I'll do that and post the results.
 
Upvote 0

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
Thinking about as the other workbook will be open, you can just use
Excel Formula:
=VLOOKUP("Total Disc / Coup",'[276.dsr.xls]Sheet1'!$A$1:$P$22,9,FALSE)
 
Upvote 0
Solution
OK, I just entered a 7 into the cell (formatted as a number) and still get a #REF error code with the formula.
 
Upvote 0
Yippee, your new formula worked perfectly. Thank you so much for taking your time to help!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,216,036
Messages
6,128,432
Members
449,452
Latest member
Chris87

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