close

Hi,

Does anyone know if its possible to sort data by more than the 3
criteria in the sort menu in Datagt;Sort?

Preferably I need to do it on 5 columns, I can't figure it out though -
Would I need to use a pivot table?

Thanks for any help at all.

Regards,

saybut.--
saybut
------------------------------------------------------------------------
saybut's Profile: www.excelforum.com/member.php...foamp;userid=5949
View this thread: www.excelforum.com/showthread...hreadid=514329
Hi, sorry I've just figured out how to do it.

Just in case anyone is interested, if you're sorting five columns,
A,B,C,D,E

sort the last three first, C,D,E and then sort A,B.or if anyone has any better ways let me know.

thanks.--
saybut
------------------------------------------------------------------------
saybut's Profile: www.excelforum.com/member.php...foamp;userid=5949
View this thread: www.excelforum.com/showthread...hreadid=514329No, that is the way to do it.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

quot;saybutquot; gt; wrote in
message ...
gt;
gt; Hi, sorry I've just figured out how to do it.
gt;
gt; Just in case anyone is interested, if you're sorting five columns,
gt; A,B,C,D,E
gt;
gt; sort the last three first, C,D,E and then sort A,B.
gt;
gt;
gt; or if anyone has any better ways let me know.
gt;
gt; thanks.
gt;
gt;
gt; --
gt; saybut
gt; ------------------------------------------------------------------------
gt; saybut's Profile:
www.excelforum.com/member.php...foamp;userid=5949
gt; View this thread: www.excelforum.com/showthread...hreadid=514329
gt;
Another way is to join columns together in a helper column, eg in F2
enter the formula:

=A2amp;B2amp;C2amp;D2 amp;E2

copy down, and sort on this one field. The fields should be converted
to fixed width if they are not already. If the field is text then
spaces can be added to make it up to a fixed number of characters, and
if it is numeric it can be made fixed width using TEXT( ). So you might
actually have something like:

=A2amp;B2amp;REPT(quot; quot;,20-LEN(B2))amp;C2amp;REPT(quot; quot;,10-LEN(C2))amp;TEXT(D2,quot;000quot;)amp;E2

Here A2 is already fixed width (eg code number), B2 is made up to 20
characters, C2 is made up to 10 characters, D2 is a number fixed to 3
characters and E2 is not changed. The advantage is only one sort is
needed.

Of course, this leaves two other slots in the sort dialogue box for
further refinement.

Hope this helps.

Pete
Thanks a lot for the posts. At the moment I'll just stick with the
orignal method. Although it doesn't seem to work sort from the back to
the front more than twice - maybe just me though.

thanks again.--
saybut
------------------------------------------------------------------------
saybut's Profile: www.excelforum.com/member.php...foamp;userid=5949
View this thread: www.excelforum.com/showthread...hreadid=514329

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()