I'm trying to rounddown the figures in Col A, to the values in I2:R2
i.e. 2.72 = 2, 4.6 = 4
But I'm wondering why values such as 5.1 are being rounded up to 6 (when they should be rounded down to 4)
Ty
Mdn
I'm trying to rounddown the figures in Col A, to the values in I2:R2
i.e. 2.72 = 2, 4.6 = 4
But I'm wondering why values such as 5.1 are being rounded up to 6 (when they should be rounded down to 4)
Ty
Mdn
wrt A4:
ROUNDDOWN(5.1,0) ---> 5
MATCH(5,$I$2:$R$2,-1*) ---> 6
*If match_type is -1, MATCH finds the smallest value that is greater than or equal to lookup_value (5 in this case). Lookup_array must be placed in descending order; no 5 therefore 6 is returned
Last edited by protonLeah; 08-24-2018 at 02:39 PM.
Ben Van Johnson
Looks like an extension of this previous topic: https://www.excelforum.com/excel-for...wo-values.html
I think you need to spend a little more time understanding the -1 approximate match option for the MATCH() function that you are using. Using the 5.1 value as an example (follow along with the evaluate formula tool, if you want https://support.office.com/en-us/art...6-a70aa409b8a7 ):
1) 5.1 rounded down to the nearest integer is 5
2) 5 is between 6 and 4 in the descendingly sorted list. With the match type set to -1, Excel will see that 5 is between 6 and 4 and return the position of the number 6 (6th entry).
3) The INDEX() function then returns the 6th value in the list, which is 6.
For a round down type scenario like this, I would expect to have the list sorted in ascending order (like yesterday's list was) and use +1 as the match type argument. If I sort the lookup range in ascending order and switch the match type argument to 1, I get the values indicated in column C.
Originally Posted by shg
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks