AUTOMATICALLY CHANGE INDEX REFERENCE PATH TO A CELL(CONTAINING THE NEW PATH DIRECTORY)

Cyrille

New Member
Joined
Jun 3, 2022
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hi guys,

I am currently working on a tool to efficiently print the logs of our production process. However, sad to say I am really stucked.
Initially, my idea was to be able to select the desired .xlsx file from a directory - which I was able to do using a macro.
Then be able to print the cell values from the "Data" sheet of that file. So I would need to be able to automatically change the reference of the INDEX function for this.
Is there a way to do this? Below is how my formula looks when I manually input the worksheet name on the formula but I would like to automate it by simply selecting the file because I would have to go through 20 to 40 sets of logs a day.

=IF(B2>1,INDEX([20220523.xlsx]Data!$A$1:$AG$2423,RIGHT($I2,LEN($I2)-1),28),"")
 

Attachments

  • png1.png
    png1.png
    5.6 KB · Views: 22
  • png2.png
    png2.png
    15 KB · Views: 15

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,224,816
Messages
6,181,141
Members
453,021
Latest member
Justyna P

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