Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RogerWilco
 
Posts: n/a
Default How do I sort a range of cells via a worksheet function


I have one column of unsorted cells.

I want to create a second column with the sorted values from the first
column.

I can easily copy/paste the first column and then manually use the sort
menu command. But I want to do that via a worksheet function so that
when I change the unsorted values in the first column, the sorted
column automatically updates.

Make sense? I need to keep both the unsorted and sorted versions of the
same data.


--
RogerWilco
------------------------------------------------------------------------
RogerWilco's Profile: http://www.excelforum.com/member.php...o&userid=18906
View this thread: http://www.excelforum.com/showthread...hreadid=499625

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default How do I sort a range of cells via a worksheet function

What kind of data is this for? Text? Numeric? Mixed? Any duplicates?

Biff

"RogerWilco" wrote
in message ...

I have one column of unsorted cells.

I want to create a second column with the sorted values from the first
column.

I can easily copy/paste the first column and then manually use the sort
menu command. But I want to do that via a worksheet function so that
when I change the unsorted values in the first column, the sorted
column automatically updates.

Make sense? I need to keep both the unsorted and sorted versions of the
same data.


--
RogerWilco
------------------------------------------------------------------------
RogerWilco's Profile:
http://www.excelforum.com/member.php...o&userid=18906
View this thread: http://www.excelforum.com/showthread...hreadid=499625



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RogerWilco
 
Posts: n/a
Default How do I sort a range of cells via a worksheet function


They are all numeric and there can be duplicates... Does that matter?
Can't you do a sort regardless of data type?


--
RogerWilco
------------------------------------------------------------------------
RogerWilco's Profile: http://www.excelforum.com/member.php...o&userid=18906
View this thread: http://www.excelforum.com/showthread...hreadid=499625

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default How do I sort a range of cells via a worksheet function

To sort a range of cells that is all NUMERIC:

Assume the range is A1:5:

To sort ascending:

=SMALL(A$1:A$5,ROWS($1:1))

Copy down 5 cells.

To sort descending just replace SMALL with LARGE.

To sort a range of cells that is all TEXT:

To sort ascending:

Entered as an array using the key combo of CTRL,SHIF,ENTER:

=INDEX($A$1:$A$5,MATCH(SMALL(COUNTIF($A$1:$A$5,"<" &$A$1:$A$5),ROWS($1:1)),COUNTIF($A$1:$A$5,"<"&$A$1 :$A$5),0))

Copy down 5 cells.

To sort descending replace SMALL with LARGE.

Don't even ask to sort mixed data!!!! (both TEXT and NUMERIC)

Biff

"RogerWilco" wrote
in message ...

They are all numeric and there can be duplicates... Does that matter?
Can't you do a sort regardless of data type?


--
RogerWilco
------------------------------------------------------------------------
RogerWilco's Profile:
http://www.excelforum.com/member.php...o&userid=18906
View this thread: http://www.excelforum.com/showthread...hreadid=499625



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
total a range of cells in Excel into a different worksheet Joint Council Excel Worksheet Functions 2 November 21st 05 04:15 PM
subtotal a range of cells on a different worksheet cheryl Excel Worksheet Functions 0 November 2nd 05 08:37 PM
creating function (vba) with range arguments Fredouille Excel Worksheet Functions 2 September 12th 05 11:01 AM
Sorting a range of cells that get value from other cells Matt Caswell Excel Discussion (Misc queries) 3 July 13th 05 04:52 PM
How to paste INDIRECT function to range of cells? Mike Williams Excel Worksheet Functions 4 March 18th 05 03:02 AM


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