Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Alternating sort question

My wife is working on a spreadsheet for a class roster and one column
specifies gender (M,F). She would like to sort the students by alternating M
& F instead of all M and then all F to assign a seating chart. Is this
possible? Thanks in advance!

GaryM
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Alternating sort question

Perhaps you could sort by gender first to get all the F's together
then all the M's. Then fill a sequence down a helper column 1, 2, 3
etc for just the females. Fill a new sequence 1, 2, 3 etc down the
column for just the males. Then you can sort the data plus the helper
column using the helper sequence as the sort key (plus gender as the
second key), and then you will get the sequence 1_F, 1_M, 2_F, 2_M,
3_F, 3_M etc. You can delete the helper column then.

Obviously, if you have more of one gender then these will all appear
together at the end.

Hope this helps.

Pete

On Apr 27, 8:17*pm, GaryM wrote:
My wife is working on a spreadsheet for a class roster and one column
specifies gender (M,F). *She would like to sort the students by alternating M
& F instead of all M and then all F to assign a seating chart. *Is this
possible? *Thanks in advance!

GaryM


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,549
Default Alternating sort question


Sort the students by gender.
In an adjoining column, consecutively number the male students... say 1 thru 20
and then assign the same numbers to the female students... 1 thru 20.
Select all the data including the new column and sort using the new column as the key.
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)


"GaryM"
wrote in message
My wife is working on a spreadsheet for a class roster and one column
specifies gender (M,F). She would like to sort the students by alternating M
& F instead of all M and then all F to assign a seating chart. Is this
possible? Thanks in advance!
GaryM
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Alternating sort question

Probably an easier way but here goes my contribution.

DataFilterAutofilter for F on the gender column.

In a helper column enter 1 through whatever using consecutive odd numbers.

Show All then Filter on M and enter 2 through whatever using even numbers.

Remove the Filter and sort by helper column.


Gord Dibben MS Excel MVP

On Sun, 27 Apr 2008 12:17:01 -0700, GaryM
wrote:

My wife is working on a spreadsheet for a class roster and one column
specifies gender (M,F). She would like to sort the students by alternating M
& F instead of all M and then all F to assign a seating chart. Is this
possible? Thanks in advance!

GaryM


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Alternating sort question

I knew there was an easier way<g

Assign same numbers after filtering, not odds and evens.


Gord

On Sun, 27 Apr 2008 12:41:17 -0700, "Jim Cone"
wrote:

In an adjoining column, consecutively number the male students... say 1 thru 20
and then assign the same numbers to the female students... 1 thru 20.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,549
Default Alternating sort question


The most difficult solution is usually the first one to come to mind.
That's the way it works for me. <g
Jim Cone


"Gord Dibben"
wrote in message
I knew there was an easier way<g
Assign same numbers after filtering, not odds and evens.
Gord



On Sun, 27 Apr 2008 12:41:17,
"Jim Cone"
wrote:
In an adjoining column, consecutively number the male students... say 1 thru 20
and then assign the same numbers to the female students... 1 thru 20.


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
A question (sort of) Joe C Excel Discussion (Misc queries) 4 January 24th 08 03:03 PM
question on VB-sort peyman Excel Discussion (Misc queries) 2 September 21st 07 09:20 PM
Sort question?? SAM SEBAIHI Excel Discussion (Misc queries) 0 November 29th 06 02:03 AM
sort question D Excel Worksheet Functions 0 August 2nd 06 10:08 PM
sort question Romi Excel Discussion (Misc queries) 1 June 16th 05 11:25 PM


All times are GMT +1. The time now is 07:45 PM.

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"