#1   Report Post  
Posted to microsoft.public.excel.misc
mcsmith1x
 
Posts: n/a
Default An If/Then Sort?

Recently converted all data from an old program to Excel list of ex-students
for a reunion. New request is to sort by Maiden name for the women, and Last
Name for the men for the book. First sort - YearGrad; Second Sort - either
maiden or last name. Can I somehow say sort by maiden unless blank, then sort
by last name?
--
Working Mom (redundant wording)
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default An If/Then Sort?

I'd add another column--call it "name to Sort"

then use a formula to fill it:

=if(c2<"",c2,d2)

Where C2 held the maiden name and D2 held the current last name.



mcsmith1x wrote:

Recently converted all data from an old program to Excel list of ex-students
for a reunion. New request is to sort by Maiden name for the women, and Last
Name for the men for the book. First sort - YearGrad; Second Sort - either
maiden or last name. Can I somehow say sort by maiden unless blank, then sort
by last name?
--
Working Mom (redundant wording)


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
mcsmith1x
 
Posts: n/a
Default An If/Then Sort?

Awesome! It works!
--
Working Mom (redundant wording)


"Dave Peterson" wrote:

I'd add another column--call it "name to Sort"

then use a formula to fill it:

=if(c2<"",c2,d2)

Where C2 held the maiden name and D2 held the current last name.



mcsmith1x wrote:

Recently converted all data from an old program to Excel list of ex-students
for a reunion. New request is to sort by Maiden name for the women, and Last
Name for the men for the book. First sort - YearGrad; Second Sort - either
maiden or last name. Can I somehow say sort by maiden unless blank, then sort
by last name?
--
Working Mom (redundant wording)


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
ivory_kitten
 
Posts: n/a
Default An If/Then Sort?

You could add an extra column for sorting, say SortName with a formula:

=IF(MaidenName="",Surname,MaidenName)

Hope this helps

"mcsmith1x" wrote:

Recently converted all data from an old program to Excel list of ex-students
for a reunion. New request is to sort by Maiden name for the women, and Last
Name for the men for the book. First sort - YearGrad; Second Sort - either
maiden or last name. Can I somehow say sort by maiden unless blank, then sort
by last name?
--
Working Mom (redundant wording)

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
Select rows and sort based on type Sarah Excel Discussion (Misc queries) 0 October 11th 05 05:06 PM
data sort is not including all columns in sort Tracy Excel Discussion (Misc queries) 1 October 4th 05 12:16 AM
sorting more than 3 keys Brooke Excel Discussion (Misc queries) 3 June 18th 05 04:52 AM
"-" ignored in sort Mike H Excel Discussion (Misc queries) 8 January 2nd 05 07:48 AM
HELP! How do you--> Lock a set of rows but also link worksheets to FRUSTRATED Excel Discussion (Misc queries) 6 December 29th 04 10:05 PM


All times are GMT +1. The time now is 03:01 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"