VLOOKUP with ROUNDUP between 0.7 and 0.8 will not work

ian0411

New Member
Joined
Aug 17, 2012
Messages
18
I have an interesting question regarding VLOOKUP and ROUNDUP functions use together for numbers between 0.7 and 0.8. As you can see the attached image, numbers greater than 0.7 but less than 0.8 will not work with the ROUNDUP or TRUNC (you can ignore the outcomes for 0.6, 0.7 and 0.8 since this is for testing) functions. It worked for CEILING but CEILING won't work for other numbers. Of course everything would work if I hard-coded those numbers into VLOOKUP directly. I also tried with INDEX/MATCH or made all the formulas listed there as array formulas but they come out the same as regular VLOOKUP. This is Excel 2007 and I haven't tried on other versions yet. Can anyone take a look and let me know if this is a bug that MS should fix or if there are any other ways that I can cover all these numbers and get the results? Thank you so much.

Ilwox.jpg
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Is that the real range/rate table? If so, why not:

Code:
=0.015+(ROUNDUP(D2,1)*0.025)

Strange problem though and it happens for me. I was able to use the following:

Code:
=VLOOKUP(INT(ROUNDUP(D2,1)*10)/10,$A$2:$B$12,2,0)

Rounding schmounding.

WBD
 
Upvote 0
HTML:
The values in A2:A12 are hard coded. Column B is also hard coded.
 
Last edited:
Upvote 0
It's a floating point issue, I suspect that the int approach above is probably the best option to resolve. Depending on your use case, you could set the "set precision as displayed flag" and use a helper column with the 0.8
 
Last edited:
Upvote 0
This worked but isn't this really odd. Totally forgot the INT function. Let's see if any other people come up with other solutions.

Is that the real range/rate table? If so, why not:

Code:
=0.015+(ROUNDUP(D2,1)*0.025)

Strange problem though and it happens for me. I was able to use the following:

Code:
=VLOOKUP(INT(ROUNDUP(D2,1)*10)/10,$A$2:$B$12,2,0)

Rounding schmounding.

WBD
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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