View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Johnson Ken Johnson is offline
external usenet poster
 
Posts: 1,073
Default Sorting array function explanation please

I searched previous posts for a formula that could sort a column of
text values and found this gem, which I have adapted to sort a range
named AList.
The original formula was supplied by Harlan Grove in Jun 2004...

=INDEX(AList,MATCH(SMALL(COUNTIF(AList,"<"&AList)+ COUNT(AList),ROW()-
ROW($E$1)+1),COUNTIF(AList,"<"&AList)+COUNT(AList) ,0))

This array formula works perfectly; however, I am having trouble
understanding how it works.

The SMALL function’s first argument, COUNTIF(AList,"<"&AList)
+COUNT(AList), has to return an array.
This is the bit I can’t understand.
Can anyone explain for me how COUNTIF(AList,"<"&AList)+COUNT(AList)
manages to return an array for the SMALL function’s first argument?

Ken Johnson