Lookup Data from Dynamic Online Document

jfeldman1994

New Member
Joined
Jun 18, 2013
Messages
5
Hi all,

I have tried numerous ways to approach this problem to no avail but maybe someone can finally help me solve it. I have to pull dates from excel spreadsheets that are stored online. There are around 50 different spreadsheets that I need to get the same data from. Each spreadsheet has the nearly same title, "P401_9600021345.xlsm" and the exact same format in excel. I already have a VLookup and an index match formula that go to that specific document and get the data. i.e.

"=VLOOKUP(D1, 'http://google.com/org/osmp/metrics/Shared Documents/Supply_Chain/Excel Systems P401 Data/401/[P401_9600021345.xlsm]Template!$A$4:$E$37,2, FALSE)"

"=INDEX('http://google.com/org/osmp/metrics/Shared Documents/Supply_Chain/Excel Systems F401 Data/401/[P401_9600021345.xlsm]Template'!$A:$K,(MATCH(D$1,'http://google.com/org/osmp/metrics/Shared Documents/Supply_Chain/Excel Systems F401 Data/401/[P401_9600021345.xlsm]Template'!$A:$A,0)),2)"

Both of these work fine. However I need the links to be dynamic. I have a column with all of the different P401 Numbers. I wanted to have the URL build depending on what value is in the column.

i.e.
A1: 9600021345
A2: 9600025648
A3: 9600045679
so on...

"=VLookup(D1," ' "&"http://google.com/org/osmp/metrics/Shared Documents/Supply_Chain/Excel Systems P401 Data/401/[P401_"&$A1&".xlsm]Template!$A$4:$E$37",2, FALSE)

Any thoughts would be greatly appreciated. Note: All of this information is not the real data due to proprietary complications so these are just made up examples of what I am trying to accomplish. They are based on the real format though.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
You should be able to do this through the INDIRECT() function.

So you have the number part of the file name in column A
Then in Column B you could create the file name with
B1="'http://google.com/org/osmp/metrics/Shared Documents/Supply_Chain/Excel Systems P401 Data/401/[P401_" & A1 & ".xlsm]Template'!"
in C1 you could have =B1 & "$A$4:$E$37"

Then your vlookup would become:
=VLOOKUP(D1,INDIRECT(C1),2,FALSE)

in the same way you can build the Index formula
 
Upvote 0
The only problem is that indirect needs to have the file open on the computer in order to work. These files are all online and so none will ever be able to be opened directly on the computer, there are at least 50 files.
 
Upvote 0
In that case create a macro that you run first to create the required formulas from the list of P401 numbers.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

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