#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 386
Default Sorting a list

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Sorting a list

Please note that this is an array formula. Within the cell in edit mode (F2)
paste this formula and press Ctrl+Shift+Enter to apply this formula. If
successful in 'Formula Bar' you can notice the curly braces at both ends like
"{=<formula}"

In E1
=IF(ROW()COUNTIF($B$1:$B$1000,1),"",INDEX($A$1:$A $1000,SMALL(IF($B$1:$B$1000=1,ROW($A$1:$A$1000)),R OW())))
(and copy down as required)

In F1
=IF(ROW()COUNTIF($B$1:$B$1000,2),"",INDEX($A$1:$A $1000,SMALL(IF($B$1:$B$1000=2,ROW($A$1:$A$1000)),R OW())))
(and copy down as required)

In F1
=IF(ROW()COUNTIF($B$1:$B$1000,3),"",INDEX($A$1:$A $1000,SMALL(IF($B$1:$B$1000=3,ROW($A$1:$A$1000)),R OW())))
(and copy down as required)

and so on...

If this post helps click Yes
---------------
Jacob Skaria


"LiAD" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 386
Default Sorting a list

Hi,

Thanks, works perfect.

How would I adapt this formula to read through a list and eliminate the
empty cells? I have just found something else that could benefit from this
type of formula.

Example of inputs

Bill
(blank)
Fred
(blank)
Wilma
Jill
Ben

Output is a list
Bill
Fred
Wilma
Jill
Ben

"Jacob Skaria" wrote:

Please note that this is an array formula. Within the cell in edit mode (F2)
paste this formula and press Ctrl+Shift+Enter to apply this formula. If
successful in 'Formula Bar' you can notice the curly braces at both ends like
"{=<formula}"

In E1
=IF(ROW()COUNTIF($B$1:$B$1000,1),"",INDEX($A$1:$A $1000,SMALL(IF($B$1:$B$1000=1,ROW($A$1:$A$1000)),R OW())))
(and copy down as required)

In F1
=IF(ROW()COUNTIF($B$1:$B$1000,2),"",INDEX($A$1:$A $1000,SMALL(IF($B$1:$B$1000=2,ROW($A$1:$A$1000)),R OW())))
(and copy down as required)

In F1
=IF(ROW()COUNTIF($B$1:$B$1000,3),"",INDEX($A$1:$A $1000,SMALL(IF($B$1:$B$1000=3,ROW($A$1:$A$1000)),R OW())))
(and copy down as required)

and so on...

If this post helps click Yes
---------------
Jacob Skaria


"LiAD" wrote:

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

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
List sorting nathan_savidge Excel Discussion (Misc queries) 1 April 14th 08 10:37 AM
Sorting a list Jamie Excel Discussion (Misc queries) 4 January 10th 07 06:33 PM
Sorting a List capnsean Excel Discussion (Misc queries) 1 June 2nd 06 04:24 PM
sorting a list cityfc Excel Discussion (Misc queries) 0 January 11th 06 05:32 PM
Sorting a list Clueless27 New Users to Excel 2 December 30th 05 05:18 PM


All times are GMT +1. The time now is 12:26 PM.

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

About Us

"It's about Microsoft Excel"