Thread: Sorting a list
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_] Ashish Mathur[_2_] is offline
external usenet poster
 
Posts: 1,766
Default Sorting a list

Hi,

Assume that the data is in range B3:C9. Enter 1,2,3 in B12:D12. In cell
B13, array enter (Ctrl+Shift+Enter) the following formula. Then copy this
formula down and to the right

=IF(ISERROR(INDEX($B$3:$C$9,SMALL(IF($C$3:$C$9=B$1 2,ROW($B$3:$B$9)),ROW(1:1))-ROW($C$2),1)),"",INDEX($B$3:$C$9,SMALL(IF($C$3:$C$ 9=B$12,ROW($B$3:$B$9)),ROW(1:1))-ROW($C$2),1))

Hope this helps.

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"LiAD" wrote in message
...
Hi,

If I have a list of names in col A and a list of user groups in col B is
there any function in excel i can use to generate a separate list for each
user group?

I would like excel to pick any of the names with say a 1 against it and
create a new list in say col E for user group 1, col F for group 2 etc
etc.
The order the names appear is the same as the original list. If someone
changes user group the list updates automatically.

Is this possible using formulas? (I do not want to use macros or filters)

Example of an input list

Fred 1
Bill 2
Wilma 4
Dave 1
Mike 3
Jim 2
John 1

Desired output

1 2 3
Fred Bill Mike
Dave Jim
John