#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 577
Default Automatic Data Sort?

Is there a way to automatically sort a series of data?

For instance, cells A1:A144 have a numeric value. In Column B1:B144, I'd
like to sort those numeric values in ascending order. If I update one of the
numeric values in A1:A144, is there a way that B1:B144 will automatically
update and sort without me having to put a manual ascending sort order to it?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Automatic Data Sort?

Easy if there are no duplicates:

=SMALL(A$1:A$144,ROW()) and copy down

--
Gary''s Student - gsnu200852


"Scott" wrote:

Is there a way to automatically sort a series of data?

For instance, cells A1:A144 have a numeric value. In Column B1:B144, I'd
like to sort those numeric values in ascending order. If I update one of the
numeric values in A1:A144, is there a way that B1:B144 will automatically
update and sort without me having to put a manual ascending sort order to it?

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 577
Default Automatic Data Sort?

What about if there are duplicates?




"Gary''s Student" wrote:

Easy if there are no duplicates:

=SMALL(A$1:A$144,ROW()) and copy down

--
Gary''s Student - gsnu200852


"Scott" wrote:

Is there a way to automatically sort a series of data?

For instance, cells A1:A144 have a numeric value. In Column B1:B144, I'd
like to sort those numeric values in ascending order. If I update one of the
numeric values in A1:A144, is there a way that B1:B144 will automatically
update and sort without me having to put a manual ascending sort order to it?

Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 577
Default Automatic Data Sort?

Yes. The A Column has numeric data. Some may be duplicates. Not sure how
many duplicates I will have as they are rounded to one decimal. But if one
of the values in Column A changes, that'll change that value's ranking in
Column B. Hopefully there won't be any duplicates, but with 144 values,
that's not a guarantee.

"Don Guillett" wrote:


You can use a worksheet_change event macro in the sheet module but do you
really want to sort with EACH entry?
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Scott" wrote in message
...
Is there a way to automatically sort a series of data?

For instance, cells A1:A144 have a numeric value. In Column B1:B144, I'd
like to sort those numeric values in ascending order. If I update one of
the
numeric values in A1:A144, is there a way that B1:B144 will automatically
update and sort without me having to put a manual ascending sort order to
it?

Thanks!





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Automatic Data Sort?

I'm not sure, but I think Don may be cautioning you about auto-sorting which
is easily done using event code.

The problem with automatic sorting is error checking bad data entries.

Once you hit the Enter key the sort is done and makes it more difficult to
find an error.


Gord Dibben MS Excel MVP

On Tue, 12 May 2009 14:02:02 -0700, Scott
wrote:

Yes. The A Column has numeric data. Some may be duplicates. Not sure how
many duplicates I will have as they are rounded to one decimal. But if one
of the values in Column A changes, that'll change that value's ranking in
Column B. Hopefully there won't be any duplicates, but with 144 values,
that's not a guarantee.

"Don Guillett" wrote:


You can use a worksheet_change event macro in the sheet module but do you
really want to sort with EACH entry?
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Scott" wrote in message
...
Is there a way to automatically sort a series of data?

For instance, cells A1:A144 have a numeric value. In Column B1:B144, I'd
like to sort those numeric values in ascending order. If I update one of
the
numeric values in A1:A144, is there a way that B1:B144 will automatically
update and sort without me having to put a manual ascending sort order to
it?

Thanks!




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Automatic Data Sort?

If there are duplicates, then instert the following event macro in the
worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Set r1 = Range("A1:A144")
Set r2 = Range("B1:B144")
If Intersect(Target, r1) Is Nothing Then Exit Sub
Application.EnableEvents = False
r1.Copy r2
r2.Sort Key1:=Range("B1")
Application.EnableEvents = True
End Sub


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


--
Gary''s Student - gsnu200852


"Scott" wrote:

What about if there are duplicates?




"Gary''s Student" wrote:

Easy if there are no duplicates:

=SMALL(A$1:A$144,ROW()) and copy down

--
Gary''s Student - gsnu200852


"Scott" wrote:

Is there a way to automatically sort a series of data?

For instance, cells A1:A144 have a numeric value. In Column B1:B144, I'd
like to sort those numeric values in ascending order. If I update one of the
numeric values in A1:A144, is there a way that B1:B144 will automatically
update and sort without me having to put a manual ascending sort order to it?

Thanks!

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 806
Default Automatic Data Sort?

Hello Scott,

I can offer two approaches:
http://www.sulprobil.com/html/sort_vba.html

http://www.sulprobil.com/html/sorting.html

Regards,
Bernd
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
Automatic Data Sort? Scott Excel Discussion (Misc queries) 3 April 30th 09 06:13 PM
Workbook - automatic sort of data Roseanne Excel Discussion (Misc queries) 0 March 17th 08 01:37 PM
Automatic sort ALEX Excel Discussion (Misc queries) 0 July 27th 06 07:55 PM
Automatic Sort Blade2304 Excel Discussion (Misc queries) 1 May 18th 06 10:15 AM
automatic sort Robert Excel Worksheet Functions 6 June 28th 05 02:28 PM


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