Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|