LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default HLOOKUP second column

On May 30, 7:11 pm, Kelly wrote:
I am using the following macro to gather the information that I need:
=HLOOKUP($A380,INDIRECT("'"&$A380&"'!D2:H104"),29, FALSE)

When I change the formula to
=HLOOKUP($A380,INDIRECT("'"&$A380&"'!F2:H104"),29, FALSE)
to gather data from the 3rd column of the data area, I get a #NA

I made sure to copy the lease number (the A380 reference) to each column
(D2, F2, H2) on the worksheet I'm looking up.

Can you please tell me what's wrong with the second macro? And why I'm
getting the #NA response?

thanks
Kelly


Kelly,
your formula seeks the sheet named in A380 and then goes to the range
D2:H104 and does the HLOOKUP there to find what is in row 30 of the
column that has A380's value in row 2. HLOOKUP (and VLOOKUP) require
the lookup value to appear in the first row (or column respectively)
of the lookup table. If you change your reference to F2:H104 HLOOKUP
will not be able to find the lookup value.

HTH
Kostis Vezerides

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup/hlookup without using row or column numbers Dawn - KY Excel Worksheet Functions 6 May 7th 07 05:09 PM
HLOOKUP and SUM [email protected] Excel Discussion (Misc queries) 1 October 26th 06 05:27 PM
Getting column number from HLOOKUP? [email protected] Excel Worksheet Functions 3 July 8th 06 01:18 AM
Hlookup? coa01gsb Excel Worksheet Functions 5 March 9th 06 02:03 PM
HLOOKUP Brad Excel Worksheet Functions 1 June 14th 05 11:39 PM


All times are GMT +1. The time now is 01:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"