2
I ran into this weird problem while trying to work with the HLOOKUP function. I've built a simple case here to demonstrate.
In the column starting in C7, I will enter the hlookup functions (shown in column D). the lookup values are starting in column B. The formulas in column A are the ones I entered in column B.
The table for reference is in the top two rows. The lookup value corresponds to the first row and the corresponding value in the second row is returned a output.
I tried to lookup the value .01 and .02 in the table.
If it worked right, it should return "B" for .01 and "C" for .02
But as seen here, I only get the right answer depending on what formula I use for the lookup value.
For example, in the case of .01, I get the right answer when I use the formulas ".01" and ".31-.3", but not for others such as ".11-.1"
Likewise for .02, I get the right answer when I use the formulas ".02" and ".32-.3". Everything else gives me the value in the cell preceding the right one.
Please let me know what is wrong here!
what did you write in B just values or a formula to convert A – yass – 2017-04-15T20:11:59.527
B contains the the formula in A (without the quotation marks). So B9 would have "=0.21-0.2" – PonNab – 2017-04-15T20:20:10.453
Ive updated the screenshot to show what the function for a cell in the B column looks like – PonNab – 2017-04-15T20:24:28.503
=HLOOKUP(ROUND(B15,2),$A$1:$D$2,2) use Round(B15,2) to have the exact number of decimal digit or in B15=Round(0.22-0.2,2) – yass – 2017-04-16T12:52:33.657
It's interesting because "0.11-0.1" and "0.21-0.2" returns A, but "0.31-0.3" returns B – Vylix – 2017-04-16T16:13:34.557
Adi Nugroho - gives the proper solution. I added a comment why it works on the bottom of his solution. The search index is searching INTEGERS or TEXT or STRING values, not double precision numbers or real numbers. It's a search index and so it's fast and not complex and in a lexical order of small to big. – ejbytes – 2017-04-16T19:37:46.657