#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default Q.1

how to format a cell in a 'sorting column' so that every time i put an entry
in the cell it will be sorted in its right position- in the column, i guess
it need to be after I finish entering all the other cells in the row? how
please?
thanx,
bee
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Q.1

If you are entering more than one now then wait and just use a regular sub.
Record a macro to see what is happening and then post back with more info
and your efforts. IF?? you are only entering ONE at this time then use a
worksheet_change event within the sheet module. Examples would be helpful.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"kbee" wrote in message
...
how to format a cell in a 'sorting column' so that every time i put an
entry
in the cell it will be sorted in its right position- in the column, i
guess
it need to be after I finish entering all the other cells in the row? how
please?
thanx,
bee


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Q.1

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim rng As Range
Set rng = Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
If Target.Column < 6 Then Exit Sub
Application.ScreenUpdating = False
ActiveCell.CurrentRegion.Select
With Selection
.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End With
rng.Select
Application.ScreenUpdating = False
End Sub

Will sort the currentregion by column C when you enter out last cell of column F

Adjust to suit.

Right-click on the sheet tab and "View Code".

Copy/paste into that module.


Gord Dibben MS Excel MVP

On Fri, 15 Feb 2008 11:22:02 -0800, kbee wrote:

how to format a cell in a 'sorting column' so that every time i put an entry
in the cell it will be sorted in its right position- in the column, i guess
it need to be after I finish entering all the other cells in the row? how
please?
thanx,
bee


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Q.1

One caveat with type of autosorting is................

If you misspell an entry the sorting takes place and you may have a problem
finding the misspelled entry.


Gord

On Fri, 15 Feb 2008 12:51:32 -0800, Gord Dibben <gorddibbATshawDOTca wrote:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim rng As Range
Set rng = Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
If Target.Column < 6 Then Exit Sub
Application.ScreenUpdating = False
ActiveCell.CurrentRegion.Select
With Selection
.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End With
rng.Select
Application.ScreenUpdating = False
End Sub

Will sort the currentregion by column C when you enter out last cell of column F

Adjust to suit.

Right-click on the sheet tab and "View Code".

Copy/paste into that module.


Gord Dibben MS Excel MVP

On Fri, 15 Feb 2008 11:22:02 -0800, kbee wrote:

how to format a cell in a 'sorting column' so that every time i put an entry
in the cell it will be sorted in its right position- in the column, i guess
it need to be after I finish entering all the other cells in the row? how
please?
thanx,
bee


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



All times are GMT +1. The time now is 07:52 AM.

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"