Change of Excel Formula Dynamic Variable

bmpreston

Board Regular
Joined
Jun 18, 2016
Messages
120
Office Version
  1. 365
Platform
  1. MacOS
Hello

I'm looking to make this:

='C:\Users\bprest1\Backup\Documents\Inventory\Master Region Stale\2017\[Master Region Stale Report 9-4-17.xlsx]Burris, Michael'!$E1

Use a variable cell reference for the DATE.

='C:\Users\bprest1\Backup\Documents\Inventory\Master Region Stale\2017\[Master Region Stale Report B2.xlsx]Burris, Michael'!$E1

B2 is a date.

I've tried this:

=INDIRECT("C:\Users\bprest1\Backup\Documents\Inventory\Master Region Stale\2017\[Master Region Stale Report " & B2 &".xlsx]Burris, Michael'!$E1")

No dice

Thanks
 
Your "text" formula uses B2 as the reference. Is it B2 or D2?
This worked fine for me./..
[Table="width:, class:grid"][tr][td] [/td][td]
H​
[/td][td]
I​
[/td][/tr]
[tr][td]
1​
[/td][td]
10/13/2017​
[/td][td]10-13-17[/td][/tr]
[/table]

I1=TEXT(H1,"M-D-Y")
 
Upvote 0

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Your "text" formula uses B2 as the reference. Is it B2 or D2?
This worked fine for me./..
[TABLE="class: grid"]
<tbody>[TR]
[TD][/TD]
[TD]
H​
[/TD]
[TD]
I​
[/TD]
[/TR]
[TR]
[TD]
1​
[/TD]
[TD]
10/13/2017​
[/TD]
[TD]10-13-17[/TD]
[/TR]
</tbody>[/TABLE]

I1=TEXT(H1,"M-D-Y")


You are right for questioning. The formulas from above in this topic were using B2, and I have since changed to D2. It was a copy and paste thing. Regardless, I have changed them, see for yourself in this screenshot. Nevermind all the other REF failures, this is just me trying to get ONE formula to work, so I'm using them as formula test cells.

From my understanding, I'm asking D2 (currently a date, formatted as a date) to be converted to text, in the Month, Date, Year, or really YEar format. It just gives a #NAME .

If I get this working, maybe the indirect will work...

Thanks

NAME_failure.png
 
Upvote 0
To help, I can tell you if I evaluate that formula, it chokes on the Month part.

=TEXT(43010,#NAME?,D,Y)
 
Upvote 0
Ok.

This works flawlessly..

=IF(D$2="","",(INDIRECT("'C:\Users\bprest1\Backup\Documents\Inventory\Master Region Stale\2017\[Region 3 Master Inventory Stale Report "&TEXT(D$2,"M-D-Y")&".xlsx]Burris, Michael'!$E1")))

Pulls the Date from D2 (that is live so I can drag it across the sheet), and grabs from that other file, on the Burris, Michael sheet, value in E1.

PERFECT!

However...

As soon as I close the open sheet, it instantly crashes the formula to a #REF . Can I get this to stay alive after closing the sheet? Otherwise, week after week I'd have to have EVERY file open to save the values in the fields until I can get it opened, saved, and exported.

Thanks
 
Upvote 0
As a function of closing out this thread.... All is said and done. It's awesome.

Thanks
 
Upvote 0

Forum statistics

Threads
1,223,975
Messages
6,175,749
Members
452,667
Latest member
vanessavalentino83

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