HLOOKUP External Source, but use Variable in the address

aerandir

New Member
Joined
Aug 11, 2023
Messages
1
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi All.
I started a new job where it heavily relies on Excel (and no one seems to know much about it anyway). So I'm stuck with no one able to help me...

I'm created a "dashboard" to collate all the information from different reporting sheets. All sheets have identical structure so it shouldn't be an issue aggregating the information in one place. I created a sheet for each project where it should placed strategically in a certain structure. For example:
Main Projects Folder
---PRJ0001
------PRJ0001-PCW.xlsx
---PRJ0002
------PRJ0002-PCW.xlsx
and so on

When I create the dashboard, I use the following HLOOKUP to search through the file fields:
=HLOOKUP($A5,'https://something.sharepoint.com/Shared Documents/ES Projects/PRJ0001/[PRJ0001-PCW.xlsx]PCW'!$A:$B,Variables!E$16,FALSE)

What I'm trying to do is to take the "PRJ0001" from a different field within the same row. I've tried & and CONCATENATE but they seem to break the "link" since the source is an external source.

Any ideas of how I can achieve this?

Thank you
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
I am pretty green when it comes to Excel formulas but I suspect you cannot do this without vba because of the external reference. I imagine you might concatenat the result of a range or Offset(0,?) with string portions that make up the HLookup string. That string would be evaluated with Application.Worksheet function. However, I suspect if going the code route you'd abandon the lookup altogether and just get the value you need by way of referencing the sheet and the desired cell with vba.
 
Upvote 0

Forum statistics

Threads
1,215,097
Messages
6,123,076
Members
449,094
Latest member
mystic19

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