HLookup Issue

spenstar

New Member
Joined
Apr 16, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I have an issue where my HLOOKUP lookup_value is pointing to another cell that is also using a HLOOKUP ... it returns a #N/A but if I remove the HLOOKUP from the lookup_value cell and replace it with a value, it works.

Here's my formula that won't work: =HLOOKUP(G17,D32:K38,7,FALSE)
Here's what is in G17: =HLOOKUP(G16,'MSW Production'!C17:J21,2,FALSE)

I have tried putting a *1 at the end to see if it was a translation of text to numeric, but it didn't do anything.

Any help is appreciated.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Welcome to the Board!

Are you sure that all the values you are matching on are of the same data type?
You can only compare "numbers to numbers" and "text to numbers".
Comparing "numbers entered as text to numbers" will not work.

You can easily check each one with the ISNUMBER function, i.e.
=ISNUMBER(G16)
=ISNUMBER(G17)

and then check the cells in D32:K38 and 'MSW Production'!C17:J21 that you think contain the matching value.
 
Upvote 0
Hi Joe4, thanks for the welcome! Yes, I tried that and they all come back as TRUE.
 
Upvote 0
Welcome to the Board!

Are you sure that all the values you are matching on are of the same data type?
You can only compare "numbers to numbers" and "text to numbers".
Comparing "numbers entered as text to numbers" will not work.

You can easily check each one with the ISNUMBER function, i.e.
=ISNUMBER(G16)
=ISNUMBER(G17)

and then check the cells in D32:K38 and 'MSW Production'!C17:J21 that you think contain the matching value.
Hi Joe4, thanks for the welcome! Yes, I tried that and they all come back as TRUE.
 
Upvote 0
Are you sure everything really matches exactly? No extra spaces or characters?

It might be helpful to post a sample of your data, in all the different places for us to see.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0

Forum statistics

Threads
1,215,202
Messages
6,123,625
Members
449,109
Latest member
Sebas8956

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