hlookup and match

ehardway123

New Member
Joined
May 24, 2013
Messages
22
Hey all,

I am not sure what is happening. I have used this function a bunch of times and it is giving me a #na. My function is =HLOOKUP(D2,BL!$A$4:$D$17, MATCH(Sheet6!$C$1,BL!$A$4:$A$16,0), FALSE). D2 is 13 and c1 is JUN. It should be returning the number 5 but it is giving me an #n/A. What am i doing wrong? Below is the table im trying to return the number from.

[TABLE="width: 433"]
<colgroup><col span="2"><col><col><col></colgroup><tbody>[TR]
[TD]WLTYPE[/TD]
[TD]BL[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Count of WLTYPE[/TD]
[TD]Column Labels[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Row Labels[/TD]
[TD]13[/TD]
[TD]14[/TD]
[TD]15[/TD]
[TD]Grand Total[/TD]
[/TR]
[TR]
[TD]JAN[/TD]
[TD][/TD]
[TD]11[/TD]
[TD]20[/TD]
[TD]31[/TD]
[/TR]
[TR]
[TD]FEB[/TD]
[TD][/TD]
[TD]5[/TD]
[TD]23[/TD]
[TD]28[/TD]
[/TR]
[TR]
[TD]MAR[/TD]
[TD][/TD]
[TD]6[/TD]
[TD]13[/TD]
[TD]19[/TD]
[/TR]
[TR]
[TD]APR[/TD]
[TD]7[/TD]
[TD]10[/TD]
[TD][/TD]
[TD]17[/TD]
[/TR]
[TR]
[TD]MAY[/TD]
[TD]20[/TD]
[TD]3[/TD]
[TD][/TD]
[TD]23[/TD]
[/TR]
[TR]
[TD]JUN[/TD]
[TD]5[/TD]
[TD]15[/TD]
[TD][/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]JUL[/TD]
[TD]8[/TD]
[TD]13[/TD]
[TD][/TD]
[TD]21[/TD]
[/TR]
[TR]
[TD]AUG[/TD]
[TD]15[/TD]
[TD]16[/TD]
[TD][/TD]
[TD]31[/TD]
[/TR]
[TR]
[TD]SEPT[/TD]
[TD]2[/TD]
[TD]17[/TD]
[TD][/TD]
[TD]19[/TD]
[/TR]
[TR]
[TD]OCT[/TD]
[TD]6[/TD]
[TD]6[/TD]
[TD][/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]NOV[/TD]
[TD]1[/TD]
[TD]26[/TD]
[TD][/TD]
[TD]27[/TD]
[/TR]
[TR]
[TD]DEC[/TD]
[TD]1[/TD]
[TD]13[/TD]
[TD][/TD]
[TD]14[/TD]
[/TR]
[TR]
[TD]Grand Total[/TD]
[TD]65[/TD]
[TD]141[/TD]
[TD="align: right"]56[/TD]
[TD]262[/TD]
[/TR]
</tbody>[/TABLE]
 
there is nothing wrong with your formula... I cut and pasted your data and formula and it worked as expected.

Leads me to believe that your 13 is maybe not exactly 13.... maybe it is actually a rounded number...

or JUN is not exactly JUN... maybe leading or trailing spaces exist somewhere...

test like this

=Sheet6!$C$1=A10

see if that returns TRUE

then do the same with the two cells that have the 13... likely scenario is that one of the 13's is actually text and not number
 
Last edited:
Upvote 0
... likely scenario is that one of the 13's is actually text and not number

if in fact this is the problem, then one of these should correct the issue

=HLOOKUP(TEXT(D2,0),$A$4:$D$17, MATCH($C$1,$A$4:$A$16,0), FALSE)

or try

=HLOOKUP(D2*1,$A$4:$D$17, MATCH($C$1,$A$4:$A$16,0), FALSE)
 
Upvote 0

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