Problems with combining HLOOKUP with INDIRECT

spalton

Board Regular
Joined
Feb 20, 2009
Messages
125
Hi guys, trying to use the INDIRECT function for the first time and having a few problems with it, hope you can help!

Currently got the below formula :

=HLOOKUP($C$11,INDIRECT("'&F7&'!'"&A8:U10),3,FALSE)

where I need to lookup the value in C11 from a sheet name referenced in cell F7.

I think it must be a problem with the "s or 's but I THINK I've used all the different combinations and it still isn't working.

Can anyone help point out where I've gone wrong?

Cheers in advance!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hallo Spalton,

You need to save the search area under a name area. This you can find in the menu bar.
Then you can refer to it using direct.

named area= A8:U10
field F7 = name of the area.

Try your formula again, without only indirect(F7) and it would work.

Harm
 
Upvote 0
No naming needed,

=HLOOKUP($C$11,INDIRECT("'"&F7&"'!A8:U10"),3,FALSE)
 
Upvote 0
I'm trying to lookup a list of tax ID numbers from other sheets within my workbook and pull them into a summary tab. So the column that I'm trying to set up is labelled as Parcel # and all the subsequent columns in the other tabs from which I'm trying to pull from, are also labeled Parcel #. My ideal scenario is being able to combine an Hlookup function (so that I can copy the formula down a column to bring in the rows of other information) with an indirect function (to look in the other sheets within my same workbook) but using the formulae suggested above. I keep getting an #N/A message.

Alternatively, I have been using just a standard Indirect function, INDIRECT("'"&$B$2&"'!"&"A1:a500"), and copying that down in my summary column and that pulls in the information ok. So perhaps I don't need the Hlookup? However, I have to make sure that every sheet in my workbook is structured the same way (i.e. my list of parcel #'s start on row 4 in every sheet).

I am using however, this Vlookup function (below) to pull in information from other tabs, into my summary tab, from across columns and the Vlookup is working just fine with the indirect function:

IFERROR(VLOOKUP($A6,INDIRECT("'"&$B$2&"'!"&"A1:z500"),MATCH($E$2,Crosswinds!$A$2:$ZZ$2,0)+1,FALSE),0)

I just don't know why my Hlookup function is not pulling in anything.
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,447
Members
448,966
Latest member
DannyC96

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