Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with vba/Macro sorting
Hi, I am trying to set up a worksheet that will automatically sort a record
by date and order number as soon as it's entered. I figured out a Macro to do that, but it sorts it as soon as you enter the date, and I need it to wait until all fields have been filled in. Can someone help me modify this code or suggest something different I can try? Right now, when I enter the date, I then have to scroll up to where it sorted to and fill in the rest of the info. Here's what I have: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Range("A8:J75").Sort Key1:=Range("B9"), Order1:=xlAscending, Key2:=Range( _ "C9"), Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase _ :=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, _ DataOption2:=xlSortNormal End Sub I really don't know much about vba, so when you answer, you're going to have to make it as dumbed down as possible. Thank you so much in advance!! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
sorting using macro | Excel Discussion (Misc queries) | |||
Sorting in a macro | Excel Programming | |||
macro for sorting | Excel Discussion (Misc queries) | |||
Macro for Sorting | Excel Programming | |||
Sorting with a macro? | Excel Programming |