Open duccoder opened 10 years ago
I think bug is in method static VLOOKUP line 739 to 742 in LookupRef.php
if ((is_numeric($lookup_value) && is_numeric($result)) ||
(!is_numeric($lookup_value) && !is_numeric($result))) {
return $result;
}
So with my example above, $lookup_value = "M20" => $result exactly is string(20) So if $result is number so $lookup_value is number?
same error!!
The logic here seems to be flawed to me. In my case I have a string lookup value which will return a numeric value, but it will not make it through the test that @fabienzet pointed out. So in my case I just want to return the $result
that the function has already found. Replacing the entire logic there with just return $lookup_array[$rowNumber][$returnColumn];
worked for me, but I'm not sure that is the solution for more complex things.
@AdwinTrave I hard code while I 'm waiting for a solution of my problem.
//if ((is_numeric($lookup_value) && is_numeric($result)) ||
// (!is_numeric($lookup_value) && !is_numeric($result))) {
return $result;
//}
and this return result I need. You can see HLOOKUP function.
@fabienzet Same thing I did :-)
I have code:
So it return a2 ==> TRUE But when I change code:
I get #N/A instead 200. VLOOKUP return TRUE value if table_array is string? Help me