sorting

Lowggy

New Member
Joined
Mar 3, 2018
Messages
39
I have a file with 40 plus couples with last names, first name in two consecutive rows of a column. I have another column that has a single value. The values for each couple ie two rows of a column is different. I want to sort the file keeping the couples together but sorted by the value of the other column.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Any chance we could have a smallish set of sample data and the expected results so that we are sure we know what we are dealing with?
 
Upvote 0
Any chance we could have a smallish set of sample data and the expected results so that we are sure we know what we are dealing with?

Here is a small section of the file. I want to sort so that the couples with the last names are sorted by column E. Ie the Almasi's have the lowest value of 7 in column E so they should be first, followed by Bergeron's who also have 7 and then Beierle's. I thought I could just sort by column A and then E but I want to keep the last names together then sort by column E.






[TABLE="width: 377"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD="align: right"]1[/TD]
[TD]ALFORD, JIM*[/TD]
[TD]9[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]ALFORD, RUTH*[/TD]
[TD]15[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]ALMASI, CAROL*[/TD]
[TD]15[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]ALMASI, DENNIS*[/TD]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]BADGER, JIM*[/TD]
[TD]15[/TD]
[TD="align: right"]26[/TD]
[TD="align: right"]11[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]BADGER, LYN*[/TD]
[TD]11[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]BEIERLE, BOB*[/TD]
[TD]8[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]8[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]BEIERLE, CAROLYN*[/TD]
[TD]17[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]BERGER, RHONDA*[/TD]
[TD]17[/TD]
[TD="align: right"]33[/TD]
[TD="align: right"]16[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]BERGER, TODD*[/TD]
[TD]16[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD]BERGERON, LESLIE*[/TD]
[TD]7[/TD]
[TD="align: right"]23[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD]BERGERON, MAURICE*[/TD]
[TD]16[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD]BOBE, DONNA*[/TD]
[TD]17[/TD]
[TD="align: right"]26[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD]BOBE, LARRY*[/TD]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Could you add another column with a formula like this, copied down, anf then sort using column F?

Excel Workbook
ABCDEF
1
21ALFORD, JIM*92499
31ALFORD, RUTH*159
42ALMASI, CAROL*152277
52ALMASI, DENNIS*77
63BADGER, JIM*15261111
73BADGER, LYN*1111
84BEIERLE, BOB*82588
94BEIERLE, CAROLYN*178
105BERGER, RHONDA*17331616
115BERGER, TODD*1616
126BERGERON, LESLIE*72377
136BERGERON, MAURICE*167
147BOBE, DONNA*172699
157BOBE, LARRY*99
Sort
 
Upvote 0
Could you add another column with a formula like this, copied down, anf then sort using column F?

Sort

ABCDEF
ALFORD, JIM*
ALFORD, RUTH*
ALMASI, CAROL*
ALMASI, DENNIS*
BADGER, JIM*
BADGER, LYN*
BEIERLE, BOB*
BEIERLE, CAROLYN*
BERGER, RHONDA*
BERGER, TODD*
BERGERON, LESLIE*
BERGERON, MAURICE*
BOBE, DONNA*
BOBE, LARRY*

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:26px;"><col style="width:177px;"><col style="width:33px;"><col style="width:33px;"><col style="width:33px;"><col style="width:33px;"></colgroup><tbody>
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]1[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]2[/TD]
[TD="align: right"]1[/TD]

[TD="align: right"]9[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]9[/TD]
[TD="align: right"]9[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]3[/TD]
[TD="align: right"]1[/TD]

[TD="align: right"]15[/TD]

[TD="align: right"]9[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]4[/TD]
[TD="align: right"]2[/TD]

[TD="align: right"]15[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]7[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]5[/TD]
[TD="align: right"]2[/TD]

[TD="align: right"]7[/TD]

[TD="align: right"]7[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]6[/TD]
[TD="align: right"]3[/TD]

[TD="align: right"]15[/TD]
[TD="align: right"]26[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]11[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]7[/TD]
[TD="align: right"]3[/TD]

[TD="align: right"]11[/TD]

[TD="align: right"]11[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]8[/TD]
[TD="align: right"]4[/TD]

[TD="align: right"]8[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]9[/TD]
[TD="align: right"]4[/TD]

[TD="align: right"]17[/TD]

[TD="align: right"]8[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]10[/TD]
[TD="align: right"]5[/TD]

[TD="align: right"]17[/TD]
[TD="align: right"]33[/TD]
[TD="align: right"]16[/TD]
[TD="align: right"]16[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]11[/TD]
[TD="align: right"]5[/TD]

[TD="align: right"]16[/TD]

[TD="align: right"]16[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]12[/TD]
[TD="align: right"]6[/TD]

[TD="align: right"]7[/TD]
[TD="align: right"]23[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]7[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]13[/TD]
[TD="align: right"]6[/TD]

[TD="align: right"]16[/TD]

[TD="align: right"]7[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]14[/TD]
[TD="align: right"]7[/TD]

[TD="align: right"]17[/TD]
[TD="align: right"]26[/TD]
[TD="align: right"]9[/TD]
[TD="align: right"]9[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]15[/TD]
[TD="align: right"]7[/TD]

[TD="align: right"]9[/TD]

[TD="align: right"]9[/TD]

</tbody>

Spreadsheet Formulas
CellFormula
F2=IF(E2="",F1,E2)

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
Yes that would work, thank you.
 
Upvote 0

Forum statistics

Threads
1,223,238
Messages
6,170,939
Members
452,368
Latest member
jayp2104

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top