Tommy:

Sorry, it looks like my response didn't get sent.
How "deep" do you want to go?
The fact is:  You can name a range to contain
the upper section, then either select the named range and sort,
or use a macro and do:

Sub SortData()
    ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range
("A1"), _
        SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
        xlSortTextAsNumbers
    With ActiveWorkbook.Worksheets("Sheet1").Sort
        .SetRange Range("Data")
        .Header = xlNo
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
End Sub
(this is the Excel2007 version, the Excel2003 looks much cleaner,
simply record a macro and replace
the part that sets the range with your range name)

The only problem with this is that when you insert data at row 1, it
comes in ABOVE your named range,
not part of it.  If you have a header row (that shows column headings)
and insert at row 2, then the named
range works.

another approach is to name first row of the range that  DOESN'T get
sorted (I called it "list")
then the macro would look like:

Sub SortData2()
    ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range
("A1"), _
        SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
        xlSortTextAsNumbers
    With ActiveWorkbook.Worksheets("Sheet1").Sort
        .SetRange Range("A1:D" & Range("List").Row - 1)
        .Header = xlGuess
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
End Sub

(Range("List").row gives you the row number of the first non-sorting
row, then subtract 1)

====================================
does this help?

Paul

On Dec 18, 2:04 pm, Tommy <[email protected]> wrote:
> Hi Paul, thanks for helping me.
> Below is the configuration of my data. The only area that is to be
> alphabetized is the array  of letters in the example below, A7 and
> below remain unchanged. As new data is entered it is place in row 1
> and all existing data is shifted down including the data below the
> array in column A.
> Before Alphabetizing                         After Alphabetizing
>      A  B   C  D                             A  B  C  D
> 1   Q  W  E  R                          1   A  D  B  E
> 2   D   F  G  H                         2   D  F  G  H
> 3   V   Y  U   I                        3   E   F  K  L
> 4   A   D  B  E                         4   Q  W  E  R
> 5   X   S  E  T                         5   V  Y  U   I
> 6   E   F  K   L                        6   X  S  E   T
> 7   D                           7   D
> 8   T                           8   T
> 9   W                           9   W
>
> On Dec 17, 8:25 am, Paul Schreiner <[email protected]> wrote:
>
>
>
> > Let me see if I understand.
> > A7-A#### has information that will be untouched.
>
> > First: the sort:
> > the first 6 rows and 4 columns you want to sort.
> > alphabetically.
> > each cell? or each row?
> > if each cell, vertically then horizontally?
> > as in:
> > Alpha Golf Mike Sierra
> > Bravo hotel November Tango
> > Charlie India Oscar Uniform
> > Delta Juliet Papa Victor
> > Echo Kilo Quebec Whiskey
> > Foxtrot Lima Romeo Xray
> >    
> > or
>
> > Alpha Bravo Charlie Delta
> > Echo Foxtrot Golf hotel
> > India Juliet Kilo Lima
> > Mike November Oscar Papa
> > Quebec Romeo Sierra Tango
> > Uniform Victor Whiskey Xray
>
> > ??
>
> > Now,
> > "Periodically, Information is added to the top
> > row of the array portion of this configuration whereby everything is
> > shifted down"
> > but you said row 7 stays the same.
> > What happens to the "extra" data?
>
> > can you give an example of starting values,
> > information added,
> > and what it should look like when the sort is complete?
>
> > thanks.
>
> > Paul
>
> > ________________________________
> > From: Tommy <[email protected]>
> > To: MS EXCEL AND VBA MACROS <[email protected]>
> > Sent: Wed, December 16, 2009 10:53:17 AM
> > Subject: $$Excel-Macros$$ Sorting Data
>
> > I have a rectangular array, A1 through D6 for example, of contiguous
> > cells where each cell contains a word. Additional information is
> > contained in column A, beginning at row 7 and extending downward for
> > some number of cells,  Periodically, Information is added to the top
> > row of the array portion of this configuration whereby everything is
> > shifted down, i.e. new data is always found in the first row.  Within
> > a macro I would like to be able to select the rectangular portion of
> > the array and alphabetize the information contained in it, leaving the
> > data in column A7 and beyond unaffected by the sort. Row A is the only
> > column to contain data beneath the rectangular array. Is it possible
> > to do this?
>
> > --
> > ---------------------------------------------------------------------------­­-------
> > Some important links for excel users:
> > 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads 
> > athttp://www.excelitems.com
> > 2. Excel tutorials athttp://www.excel-macros.blogspot.com
> > 3. Learn VBA Macros athttp://www.vbamacros.blogspot.com
> > 4. Excel Tips and Tricks athttp://exceldailytip.blogspot.com
>
> > To post to this group, send email to [email protected]
> > If you find any spam message in the group, please send an email to:
> > Ayush Jain  @ [email protected] or
> > Ashish Jain @ [email protected]
> > <><><><><><><><><><><><><><><><><><><><><><>
> > HELP US GROW !!
>
> > We reach over 6,500 subscribers worldwide and receive many nice notes about 
> > the learning and support from the group. Our goal is to have 10,000 
> > subscribers by the end of 2009. Let friends and co-workers know they can 
> > subscribe to group athttp://groups.google.com/group/excel-macros/subscribe- 
> > Hide quoted text -
>
> - Show quoted text -

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to [email protected]
If you find any spam message in the group, please send an email to:
Ayush Jain  @ [email protected] or
Ashish Jain @ [email protected]
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe

Reply via email to