Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Longtime
 
Posts: n/a
Default Sort a column automatically

Is there a way to automatically sort a column in ascending order while
entering numbers so that the column is sorted when last number is entered.
Appreciate all help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Sort a column automatically

Hi!

Why not just sort after the numbers have been entered?

Using formulas and a helper column:

Assume numbers are entered in column A

Enter this formula in column B:

=IF(COUNT(A:A)=ROWS($1:1),SMALL(A:A,ROWS($1:1))," ")

Copy down. If you expect to enter 10 numbers in column A then copy this
formula down 10 rows.

Biff

"Longtime" wrote in message
...
Is there a way to automatically sort a column in ascending order while
entering numbers so that the column is sorted when last number is entered.
Appreciate all help.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Longtime
 
Posts: n/a
Default Sort a column automatically



"Longtime" wrote:

Is there a way to automatically sort a column in ascending order while
entering numbers so that the column is sorted when last number is entered.
Appreciate all help.

Sorry, that did not do it
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Richard
 
Posts: n/a
Default Sort a column automatically

You might want to try this method using a command button. Substitute what you
need!
Private Sub CommandButton1_Click()
Me.CommandButton1.Caption = "Sort" 'The CommandButton1 Properties Take
FocusOnClick must be set to False
Dim rng As Range, rng1 As Range
With Worksheets("Sheet1")
Set rng = .Range(.Cells(2, "A"), .Cells(Rows.Count, "A").End(xlUp))
Set rng1 = .Cells(2, "A").End(xlToRight)
Set rng = rng.Resize(, 3)
rng.Sort _
Key1:=.Range("A2"), _
Order1:=xlAscending, _
Header:=xlNo
End With
Application.OnTime Now + TimeSerial(0, 0, 2), _
ThisWorkbook.Name & "!ResetCaption"
CommandButton1.Caption = "Sorting..."
End Sub

"Longtime" wrote:

Is there a way to automatically sort a column in ascending order while
entering numbers so that the column is sorted when last number is entered.
Appreciate all help.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default Sort a column automatically

Hi Longtime:

Here is a solution that's fun to play with:

Say you are entering numbers in an arbitrary order in column A. You can
enter them at the top of the column. You can enter them at the bottom of the
column. You can leave spaces between entries. Doesn't matter. In B1 enter:

=IF(ISERROR(LARGE(A:A,ROW())),"",LARGE(A:A,ROW()))
and copy down

Whatever you have entered in column A or whatever you will enter in column A
will automatically appear in sorted order in column B.

Column B will respond to changes in column A in an automatic fashion. It
even catches ties.
--
Gary's Student


"Longtime" wrote:



"Longtime" wrote:

Is there a way to automatically sort a column in ascending order while
entering numbers so that the column is sorted when last number is entered.
Appreciate all help.

Sorry, that did not do it



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Sort a column automatically

Sorry, that did not do it

Care to explain what that means?

Biff

"Longtime" wrote in message
...


"Longtime" wrote:

Is there a way to automatically sort a column in ascending order while
entering numbers so that the column is sorted when last number is
entered.
Appreciate all help.

Sorry, that did not do it



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Sort a column automatically

sort a column in ascending order
=IF(ISERROR(LARGE(A:A,ROW())),"",LARGE(A:A,ROW()) )


You might want tho replace LARGE with SMALL.

Biff

"Gary''s Student" wrote in message
...
Hi Longtime:

Here is a solution that's fun to play with:

Say you are entering numbers in an arbitrary order in column A. You can
enter them at the top of the column. You can enter them at the bottom of
the
column. You can leave spaces between entries. Doesn't matter. In B1
enter:

=IF(ISERROR(LARGE(A:A,ROW())),"",LARGE(A:A,ROW()))
and copy down

Whatever you have entered in column A or whatever you will enter in column
A
will automatically appear in sorted order in column B.

Column B will respond to changes in column A in an automatic fashion. It
even catches ties.
--
Gary's Student


"Longtime" wrote:



"Longtime" wrote:

Is there a way to automatically sort a column in ascending order while
entering numbers so that the column is sorted when last number is
entered.
Appreciate all help.

Sorry, that did not do it



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Sort a column automatically

Why create a command button when you can just use the sort button on the
formatting toolbar?

Biff

"Richard" wrote in message
...
You might want to try this method using a command button. Substitute what
you
need!
Private Sub CommandButton1_Click()
Me.CommandButton1.Caption = "Sort" 'The CommandButton1 Properties Take
FocusOnClick must be set to False
Dim rng As Range, rng1 As Range
With Worksheets("Sheet1")
Set rng = .Range(.Cells(2, "A"), .Cells(Rows.Count, "A").End(xlUp))
Set rng1 = .Cells(2, "A").End(xlToRight)
Set rng = rng.Resize(, 3)
rng.Sort _
Key1:=.Range("A2"), _
Order1:=xlAscending, _
Header:=xlNo
End With
Application.OnTime Now + TimeSerial(0, 0, 2), _
ThisWorkbook.Name & "!ResetCaption"
CommandButton1.Caption = "Sorting..."
End Sub

"Longtime" wrote:

Is there a way to automatically sort a column in ascending order while
entering numbers so that the column is sorted when last number is
entered.
Appreciate all help.



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Longtime
 
Posts: n/a
Default Sort a column automatically



"Biff" wrote:

Why create a command button when you can just use the sort button on the
formatting toolbar?

Biff

"Richard" wrote in message
...
You might want to try this method using a command button. Substitute what
you
need!
Private Sub CommandButton1_Click()
Me.CommandButton1.Caption = "Sort" 'The CommandButton1 Properties Take
FocusOnClick must be set to False
Dim rng As Range, rng1 As Range
With Worksheets("Sheet1")
Set rng = .Range(.Cells(2, "A"), .Cells(Rows.Count, "A").End(xlUp))
Set rng1 = .Cells(2, "A").End(xlToRight)
Set rng = rng.Resize(, 3)
rng.Sort _
Key1:=.Range("A2"), _
Order1:=xlAscending, _
Header:=xlNo
End With
Application.OnTime Now + TimeSerial(0, 0, 2), _
ThisWorkbook.Name & "!ResetCaption"
CommandButton1.Caption = "Sorting..."
End Sub

"Longtime" wrote:

Is there a way to automatically sort a column in ascending order while
entering numbers so that the column is sorted when last number is
entered.
Appreciate all help.




  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Longtime
 
Posts: n/a
Default Sort a column automatically



"Biff" wrote:

Why create a command button when you can just use the sort button on the
formatting toolbar?

Biff

"Richard" wrote in message
...
You might want to try this method using a command button. Substitute what
you
need!
Private Sub CommandButton1_Click()
Me.CommandButton1.Caption = "Sort" 'The CommandButton1 Properties Take
FocusOnClick must be set to False
Dim rng As Range, rng1 As Range
With Worksheets("Sheet1")
Set rng = .Range(.Cells(2, "A"), .Cells(Rows.Count, "A").End(xlUp))
Set rng1 = .Cells(2, "A").End(xlToRight)
Set rng = rng.Resize(, 3)
rng.Sort _
Key1:=.Range("A2"), _
Order1:=xlAscending, _
Header:=xlNo
End With
Application.OnTime Now + TimeSerial(0, 0, 2), _
ThisWorkbook.Name & "!ResetCaption"
CommandButton1.Caption = "Sorting..."
End Sub

"Longtime" wrote:

Is there a way to automatically sort a column in ascending order while
entering numbers so that the column is sorted when last number is
entered.
Appreciate all help.






  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Longtime
 
Posts: n/a
Default Sort a column automatically



"Longtime" wrote:



"Biff" wrote:

Why create a command button when you can just use the sort button on the
formatting toolbar?

Biff

"Richard" wrote in message
...
You might want to try this method using a command button. Substitute what
you
need!
Private Sub CommandButton1_Click()
Me.CommandButton1.Caption = "Sort" 'The CommandButton1 Properties Take
FocusOnClick must be set to False
Dim rng As Range, rng1 As Range
With Worksheets("Sheet1")
Set rng = .Range(.Cells(2, "A"), .Cells(Rows.Count, "A").End(xlUp))
Set rng1 = .Cells(2, "A").End(xlToRight)
Set rng = rng.Resize(, 3)
rng.Sort _
Key1:=.Range("A2"), _
Order1:=xlAscending, _
Header:=xlNo
End With
Application.OnTime Now + TimeSerial(0, 0, 2), _
ThisWorkbook.Name & "!ResetCaption"
CommandButton1.Caption = "Sorting..."
End Sub

"Longtime" wrote:

Is there a way to automatically sort a column in ascending order while
entering numbers so that the column is sorted when last number is
entered.
Appreciate all help.




  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Longtime
 
Posts: n/a
Default Sort a column automatically



"Richard" wrote:

You might want to try this method using a command button. Substitute what you
need!
Private Sub CommandButton1_Click()
Me.CommandButton1.Caption = "Sort" 'The CommandButton1 Properties Take
FocusOnClick must be set to False
Dim rng As Range, rng1 As Range
With Worksheets("Sheet1")
Set rng = .Range(.Cells(2, "A"), .Cells(Rows.Count, "A").End(xlUp))
Set rng1 = .Cells(2, "A").End(xlToRight)
Set rng = rng.Resize(, 3)
rng.Sort _
Key1:=.Range("A2"), _
Order1:=xlAscending, _
Header:=xlNo
End With
Application.OnTime Now + TimeSerial(0, 0, 2), _
ThisWorkbook.Name & "!ResetCaption"
CommandButton1.Caption = "Sorting..."
End Sub

"Longtime" wrote:

Is there a way to automatically sort a column in ascending order while
entering numbers so that the column is sorted when last number is entered.
Appreciate all help.

The column can always be sorted after the numbers have been entered. I was
hoping I could get the numbers sorted without buttons, macros or manually i.e
sorted as the numbers are entered. There is also a name attached to the
number which should follow. There are no extra columns as it is a form.
  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Sort a column automatically

If I enter your code I'll get an error.....?

Rgds

// Mats

"Gary''s Student" wrote:

Hi Longtime:

Here is a solution that's fun to play with:

Say you are entering numbers in an arbitrary order in column A. You can
enter them at the top of the column. You can enter them at the bottom of the
column. You can leave spaces between entries. Doesn't matter. In B1 enter:

=IF(ISERROR(LARGE(A:A,ROW())),"",LARGE(A:A,ROW()))
and copy down

Whatever you have entered in column A or whatever you will enter in column A
will automatically appear in sorted order in column B.

Column B will respond to changes in column A in an automatic fashion. It
even catches ties.
--
Gary's Student


"Longtime" wrote:



"Longtime" wrote:

Is there a way to automatically sort a column in ascending order while
entering numbers so that the column is sorted when last number is entered.
Appreciate all help.

Sorry, that did not do it

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
how can i multiply two columns edgar Excel Worksheet Functions 7 March 2nd 06 03:29 PM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
Positioning Numeric Values Resulting from 6 Column Array Formula Sam via OfficeKB.com Excel Worksheet Functions 2 January 5th 06 02:03 AM
How do I sort a column of formulas in Excel? Gordon Excel Discussion (Misc queries) 2 November 27th 04 01:55 AM
How do I sort a column of formulas in Excel? Gordon Excel Discussion (Misc queries) 0 November 26th 04 03:19 PM


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