#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 60
Default match function?

Why doesn't the match function work if the list is out-of-order?

Is there a function that will find the FIRST VALUE IN A LIST (EVEN IF
IT IS OUT-OF-ORDER) that is the smallest value greater than or equal
to the specified value?

For example, given in cells A1:A4:

2
3
5
1

How do I ask for the first value that comes along that is greater than
or equal to 4? So that the return value would be "3" since 5 is in
the "3"-position of the list.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default match function?

Here you go

=MATCH(SMALL(A1:A20,COUNTIF(A1:A20,"<"&D1)+1),A1:A 20,0)


with 4 in D1


hardcoded


=MATCH(SMALL(A1:A20,COUNTIF(A1:A20,"<4")+1),A1:A20 ,0)



--


Regards,


Peo Sjoblom


--


Regards,


Peo Sjoblom

"Matt" wrote in message
...
Why doesn't the match function work if the list is out-of-order?

Is there a function that will find the FIRST VALUE IN A LIST (EVEN IF
IT IS OUT-OF-ORDER) that is the smallest value greater than or equal
to the specified value?

For example, given in cells A1:A4:

2
3
5
1

How do I ask for the first value that comes along that is greater than
or equal to 4? So that the return value would be "3" since 5 is in
the "3"-position of the list.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can we get unique values in match function for same match key. Xcel[_2_] Excel Worksheet Functions 11 December 7th 07 08:13 PM
index match array function-returning only first match, need last. Julie Olsen Excel Worksheet Functions 3 December 29th 06 12:50 AM
Match as well as does not match array function Vikram Dhemare Excel Discussion (Misc queries) 7 April 25th 06 09:15 AM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM


All times are GMT +1. The time now is 09:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"