+ Reply to Thread
Results 1 to 4 of 4

Sort Data Automatically

  1. #1
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    295

    Sort Data Automatically

    Good morning,

    I am using the following macro to sort new data when its entered onto a spreadsheet (sample attached). I cannot figure out how to apply the sorting only to row 2 and beyond. The header rows keep getting assorted into the mix.

    Please Login or Register  to view this content.
    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Sort Data Automatically

    It works fine for me, but try changing Header:=xlGuess to Header:=xlYes and see if that works for you.

    BSB

  3. #3
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    295

    Re: Sort Data Automatically

    BSB,

    Sorry, I should add that the first piece of data needs to be entered in Col A.

    If you type ABC in A2, it doesnt push the data in ROW 1 down?

    I need ROW 1 headers need to stay in place.

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Sort Data Automatically

    I did that and it worked fine on my computer.
    But changing xlGuess to xlYes in the code should leave the headers in row 1 where they are, i.e. not include them in the sort.

    BSB
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Sort Data automatically using vba
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-07-2016, 02:34 AM
  2. Sort Data Automatically
    By mye_witch in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-24-2016, 05:31 AM
  3. How can i automatically sort data
    By Losguapos1 in forum Excel General
    Replies: 1
    Last Post: 10-10-2013, 08:36 AM
  4. [SOLVED] How to automatically sort out data and put into a new worksheet.
    By David_72 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-10-2012, 03:15 AM
  5. sort data automatically
    By verisme in forum Excel General
    Replies: 5
    Last Post: 12-27-2009, 04:53 AM
  6. automatically Data sort
    By s.w in forum Excel General
    Replies: 1
    Last Post: 11-14-2007, 10:42 AM
  7. [SOLVED] Sort Data Automatically
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-13-2005, 01:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1