ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   rounding numbers for match function (https://www.excelbanter.com/excel-worksheet-functions/71420-rounding-numbers-match-function.html)

erc_blair

rounding numbers for match function
 
Hi-

I have created a lookup table with 12 rows and 28 columns. (I'll call row
values "z*" and the column values "A"). In my spreadsheet, z* and A are
computed in previous cells. To use the lookup table with its discrete values
of z* and A, I have been rounding the calculated values of z* and A to match
the values in the columns and rows of the table. I have been using a
combination of "INDEX" and "MATCH" commands created by the lookup wizard to
look to the rounded z* and A values, and return the proper table value. My
confusion lies in the fact that for all values of z* except for two of them,
everything works great. For the two problem values values, I get the #N/A
error.

Any help would be greatly appreciated. Let me know if I need to provide
more info.

daddylonglegs

rounding numbers for match function
 

When I tested this I got the same thing, although MROUND seemed to be
rounding correctly I didn't always get a match when it looked like it
should, I switched to ROUND and didn't get a problem, perhaps you can
do the same

=MROUND(A1,0.2) can be replicated with

=ROUND(A1/2,1)*2


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=511981


erc_blair

rounding numbers for match function
 
Thank you so very much! That worked perfectly, and saved me a lot more
confusion. I really appreciate it. Thank you.

"daddylonglegs" wrote:


When I tested this I got the same thing, although MROUND seemed to be
rounding correctly I didn't always get a match when it looked like it
should, I switched to ROUND and didn't get a problem, perhaps you can
do the same

=MROUND(A1,0.2) can be replicated with

=ROUND(A1/2,1)*2


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=511981




All times are GMT +1. The time now is 02:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com