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

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,216,105
Messages
6,128,859
Members
449,472
Latest member
ebc9

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