Losing Lookup references when refreshing datatable

Jat999

New Member
Joined
May 7, 2016
Messages
49
Hi All

I am having troubles in trying to maintain references to a SQL datatable.

I have a sheet where the user enters an order number, there is some VBA codes that runs an SQL script to an external database to bring back information to a datatable.
All this works fine.
However there is then, on the user sheet, some vlookups that refer to various fields on the datatable.
My problem is that whenever the SQL database refreshes the datatable, some of the lookups fail with a #REF !.
I have tried creating absolute cell references but this does not work.


Any ideas please - this has been bugging me all evening - tired and needing sleep....

Thanks in advance
John
 

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.
Apologies - in my post above I refer to vlookups. I actually mean I am referencing cells directly on the data table and getting the errors.

i did mention I was tired....
 
Upvote 0
hello, John

Try giving the datatable a simple defined name, and have the lookups reference/use that name (instead of what I assume is currently a range reference like 'Sheet1'!A1:Z999)

HTH. regards, Fazza
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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