PDA

View Full Version : Hlookup returns wrong field



Alphacsulb
03-25-2008, 04:16 PM
Hello Guys,

This spreedsheet is driving me nuts. Here is my problem:

Row eleven starting at G uses this formula:
=HLOOKUP(I10,$G$3:$AB$4,2)

Pretty much what the formula says, or atleast hope it says is "Look at cell I10, if the figure in I10 matches a cell in the array G3 through AB4 then put down the figure that is below the matching one.

Row 12 is a simple if two cells match then True, if not False.

Anyways, as you can see from the picture I have the same formula in row 11, cells G11 and H11 match but I11 does not. It has the same word as I3 but is pulling the information as if it was matching to the cell in G3.

Help!!!! http://www.mrexcel.com/forum/images/smilies/confused.gif

http://i88.photobucket.com/albums/k193/Rgarcia9/2c54f309.jpg

Alphacsulb
03-25-2008, 04:18 PM
here is the file.

I am stumped.

Bob Phillips
03-25-2008, 04:26 PM
It needs to be ordered if range_lookup is TRUE. You could try

=HLOOKUP(G10,$G$3:$AB$4,2,FALSE)

which assumes you will always match.

mdmackillop
03-25-2008, 04:27 PM
If Data is not ascending, use "False" to get exact match
=HLOOKUP(G10,$G$3:$AB$4,2,FALSE)

Alphacsulb
03-25-2008, 04:32 PM
That's it guy. Hugs and kisses!

Aussiebear
03-26-2008, 12:52 AM
Now there's some encouragement to learn VBA....