Custom VBA Lookup returns #Value until source file is opened

Peteor

Board Regular
Joined
Mar 16, 2018
Messages
152
Hello! I have a custom lookup I have built in VBA, which is similar to a Vlookup, but does more things. It essentially updates my destination file with a concatenated version of data from the source file. My problem is, even though my formula is written correctly, it returns #value, until I actually open the source file. When I open the source file, the respective cells update with the proper values. I want these cells to update without having to open the source file.

I have noticed from other macros on other files, when I use a Vlookup, these values automatically update to the destination file without having to open the source file. This tells me there is a built in functionality to the Vlookup I am not utilizing on my custom VBA lookup.

The source file-type is .xlsx
Formulas are set to automatically update

Any help would be greatly appreciated.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
I'd guess that your code is referring to Range objects, which you can't do unless the file is open.
 
Upvote 0
RoryA,

Just for my understanding.... Can these lookups be accomplished without referring to range objects? What functionality does the Vlookup utilize? Do you have any recommendations?
 
Upvote 0
Try using arrays instead.
 
Upvote 0

Forum statistics

Threads
1,215,491
Messages
6,125,102
Members
449,205
Latest member
ralemanygarcia

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