VLOOKUP reference to a closed file - simple but frustrating

idlewyld89

New Member
Joined
Jun 10, 2018
Messages
23
Alright, so this isn't (or shouldn't be) difficult, but it's just one of those things...

I've already referenced several posts/sites along the same lines of this topic, but for whatever reason just can't seem to get this down. As the title suggests, I am (in VBA) referencing a dataset from a closed file. The file does not move, and the pertinent details are below:

File Name: GM Directory.xlsm
Sheet w/ dataset: Area - GM (FSM)

And the code that SHOULD provide the reference:
Range("B2") = "=VLOOKUP(RC[2], ('C:\Users\usraccnt\Desktop\[GM Directory.xlsm]Area - GM (FSM)'!GM_Directory[#All]), 5, FALSE)"
Range(global_findRange("B2")).Select
Selection.FillDown

In case it's useful, global_findRange is a separate function that determines the end of the active dataset so as to allow the "filldown" function to only fill through the last row.

Who will spot my glaring mistake!?!?
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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