Reputation: 617
In excel, the match function is failing to find a match in a range that contains it.
Since we can't attach workbooks, create the MRE with the following steps:
For me, C1 is #NA. Does it show that for you? If so, why? If not, can you think of why it would for me?
Tried:
Upvotes: 0
Views: 169
Reputation: 3490
Computers operate in base 2, not base 10, so when doing floating point arithmetic, there are some numbers that can not be represented, even if they seem perfectly fine in base 10. You are seeing 0.01, but Excel has actually calculated 0.0100000000000000000000x or something along those lines.
If you want to make your example work, try setting B1 to
=ROUND(1-A1,2)
Alternatively, if you know you just need two digits of decimal precision (assumed since you are matching to 0.01), you can just avoid the floating point all together by:
=(100-(100*A1))/100
Upvotes: 3