#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Sorting

I am sorting by the following


=ISNA(MATCH(D2,$P$2:$P$2500,FALSE))

is the formula that is in cell y2.

=ISNA(MATCH(P2,$D$2:$D$2500,FALSE))

is the formula that is in cell z2.

What I would like to know is there anyway I can all the "TRUE" values to be
listed first and the "FALSE" values to be listed after those?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 266
Default Sorting

"OfficeNDN" skrev i en meddelelse
...
I am sorting by the following


=ISNA(MATCH(D2,$P$2:$P$2500,FALSE))

is the formula that is in cell y2.

=ISNA(MATCH(P2,$D$2:$D$2500,FALSE))

is the formula that is in cell z2.

What I would like to know is there anyway I can all the "TRUE" values to
be
listed first and the "FALSE" values to be listed after those?




Here's one way to do it, but your ranges are so big, that
the practical use of the formula is dubious. However the
formula first lists the group of all values from D2:D2500,
which are not in P2:P2500 and then the group of all values
which are.

In Y2:

= INDEX($D$2:$D$2500, MATCH(SMALL(IF($D$2:$D$2500="",FALSE,
IF(COUNTIF($P$2:$P$2500,$D$2:$D$2500),ROW($D$2:$D$ 2500)*100000,
ROW($D$2:$D$2500))),ROW()-ROW($Y$2)+1),IF($D$2:$D$2500="",FALSE,
IF(COUNTIF($P$2:$P$2500,$D$2:$D$2500)*($D$2:$D$250 0<""),
ROW($D$2:$D$2500)*100000,ROW($D$2:$D$2500))),0))

If you start in another cell e.g. H5, the expression ROW()-ROW($Y$2) must
be ROW()-ROW($H$5).

The formula must be entered with <Shift<Ctrl<Enter, also if
edited later.

To get a visual indication of where one group ends and the
other group starts, you can use this formula in Z2:

=IF(COUNTIF($P$2:$P$2500,Y2)0,"XX","")

Select Y2:Z2 and copy down.

Similar for your other formula.


--
Best regards
Leo Heuser

Followup to newsgroup only please.



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
Sorting Sorting Sorting Skydiver Excel Discussion (Misc queries) 4 June 3rd 06 02:42 PM
Sorting Data in ascending order sharon2006 Excel Discussion (Misc queries) 1 March 14th 06 01:07 AM
sorting non contiguous ranges gsh20 Excel Discussion (Misc queries) 1 September 8th 05 04:50 PM
Advice sought: Multiple column sorting davidm Excel Worksheet Functions 3 July 29th 05 02:06 PM
Sorting 1, 1A, 2, 2A, 3, 4, 4A, 4B . . . agc1234 Excel Discussion (Misc queries) 6 May 26th 05 08:02 PM


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