Hi,
I am using the following formula:
=INDEX(D4:D35,MATCH(MIN(ABS(D4:D35-B13)),ABS(D4:D35-B13),-1))
Cell B13 contains the number 660
My array contains the following list sorted into descending order:
[TABLE="width: 64"]
[TR]
[TD="class: xl63, width: 64"]4680[/TD]
[/TR]
[TR]
[TD="class: xl63"]4100[/TD]
[/TR]
[TR]
[TD="class: xl63"]3330[/TD]
[/TR]
[TR]
[TD="class: xl63"]2900[/TD]
[/TR]
[TR]
[TD="class: xl63"]2530[/TD]
[/TR]
[TR]
[TD="class: xl63"]2430[/TD]
[/TR]
[TR]
[TD="class: xl63"]2210[/TD]
[/TR]
[TR]
[TD="class: xl63"]2020[/TD]
[/TR]
[TR]
[TD="class: xl63"]1980[/TD]
[/TR]
[TR]
[TD="class: xl63"]1900[/TD]
[/TR]
[TR]
[TD="class: xl63"]1800[/TD]
[/TR]
[TR]
[TD="class: xl63"]1640[/TD]
[/TR]
[TR]
[TD="class: xl63"]1490[/TD]
[/TR]
[TR]
[TD="class: xl63"]1470[/TD]
[/TR]
[TR]
[TD="class: xl63"]1370[/TD]
[/TR]
[TR]
[TD="class: xl63"]1330[/TD]
[/TR]
[TR]
[TD="class: xl63"]1280[/TD]
[/TR]
[TR]
[TD="class: xl63"]1220[/TD]
[/TR]
[TR]
[TD="class: xl63"]1210[/TD]
[/TR]
[TR]
[TD="class: xl63"]1100[/TD]
[/TR]
[TR]
[TD="class: xl63"]1060[/TD]
[/TR]
[TR]
[TD="class: xl63"]974[/TD]
[/TR]
[TR]
[TD="class: xl63"]869[/TD]
[/TR]
[TR]
[TD="class: xl63"]847[/TD]
[/TR]
[TR]
[TD="class: xl63"]792[/TD]
[/TR]
[TR]
[TD="class: xl63"]750[/TD]
[/TR]
[TR]
[TD="class: xl63"]692[/TD]
[/TR]
[TR]
[TD="class: xl63"]649[/TD]
[/TR]
[TR]
[TD="class: xl63"]591[/TD]
[/TR]
[TR]
[TD="class: xl63"]566[/TD]
[/TR]
[TR]
[TD="class: xl63"]534[/TD]
[/TR]
[TR]
[TD="class: xl63"]504
[/TD]
[/TR]
[/TABLE]
My expectation was for the formula to return 692 however it doesn't, using either type 0 or -1 always returns 649 and type 1 returns N\A regardless of how the array is sorted.
I'd very much appreciate if someone could explain what I need to do, to get the formula to return 692 i.e. Match Type -1 [FONT="]MATCH finds the smallest value greater than or equal to lookup value. Lookup array must be sorted in descending order.
Kind regards
Dave.[/FONT]
I am using the following formula:
=INDEX(D4:D35,MATCH(MIN(ABS(D4:D35-B13)),ABS(D4:D35-B13),-1))
Cell B13 contains the number 660
My array contains the following list sorted into descending order:
[TABLE="width: 64"]
[TR]
[TD="class: xl63, width: 64"]4680[/TD]
[/TR]
[TR]
[TD="class: xl63"]4100[/TD]
[/TR]
[TR]
[TD="class: xl63"]3330[/TD]
[/TR]
[TR]
[TD="class: xl63"]2900[/TD]
[/TR]
[TR]
[TD="class: xl63"]2530[/TD]
[/TR]
[TR]
[TD="class: xl63"]2430[/TD]
[/TR]
[TR]
[TD="class: xl63"]2210[/TD]
[/TR]
[TR]
[TD="class: xl63"]2020[/TD]
[/TR]
[TR]
[TD="class: xl63"]1980[/TD]
[/TR]
[TR]
[TD="class: xl63"]1900[/TD]
[/TR]
[TR]
[TD="class: xl63"]1800[/TD]
[/TR]
[TR]
[TD="class: xl63"]1640[/TD]
[/TR]
[TR]
[TD="class: xl63"]1490[/TD]
[/TR]
[TR]
[TD="class: xl63"]1470[/TD]
[/TR]
[TR]
[TD="class: xl63"]1370[/TD]
[/TR]
[TR]
[TD="class: xl63"]1330[/TD]
[/TR]
[TR]
[TD="class: xl63"]1280[/TD]
[/TR]
[TR]
[TD="class: xl63"]1220[/TD]
[/TR]
[TR]
[TD="class: xl63"]1210[/TD]
[/TR]
[TR]
[TD="class: xl63"]1100[/TD]
[/TR]
[TR]
[TD="class: xl63"]1060[/TD]
[/TR]
[TR]
[TD="class: xl63"]974[/TD]
[/TR]
[TR]
[TD="class: xl63"]869[/TD]
[/TR]
[TR]
[TD="class: xl63"]847[/TD]
[/TR]
[TR]
[TD="class: xl63"]792[/TD]
[/TR]
[TR]
[TD="class: xl63"]750[/TD]
[/TR]
[TR]
[TD="class: xl63"]692[/TD]
[/TR]
[TR]
[TD="class: xl63"]649[/TD]
[/TR]
[TR]
[TD="class: xl63"]591[/TD]
[/TR]
[TR]
[TD="class: xl63"]566[/TD]
[/TR]
[TR]
[TD="class: xl63"]534[/TD]
[/TR]
[TR]
[TD="class: xl63"]504
[/TD]
[/TR]
[/TABLE]
My expectation was for the formula to return 692 however it doesn't, using either type 0 or -1 always returns 649 and type 1 returns N\A regardless of how the array is sorted.
I'd very much appreciate if someone could explain what I need to do, to get the formula to return 692 i.e. Match Type -1 [FONT="]MATCH finds the smallest value greater than or equal to lookup value. Lookup array must be sorted in descending order.
Kind regards
Dave.[/FONT]