+ Reply to Thread
Results 1 to 6 of 6

Creating a Macros or VBA to auto sort data by three columns

  1. #1
    Registered User
    Join Date
    04-02-2012
    Location
    Kansas
    MS-Off Ver
    Excel 2010
    Posts
    43

    Creating a Macros or VBA to auto sort data by three columns

    I have a spreadsheet that I would like to create a macros for. I have never used VBA but if you can walk me through it that I'm sure I can get it done. I receive a file and I have to do the following to it:
    Font changed to 12
    Row Height changed to 45
    Custom Sort by Street Name, Number, and Pole Number
    Add Header by Document Name
    Add Footer Page # of ?

    I receive about 75 emails with these files in them over the course of a week which is why I'd like to simplify my process for each one.

    I can set a macros for all except the custom sort. Can someone help me figure out how to add the sort or write a VBA to include all of this?

    Thanks,

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Creating a Macros or VBA to auto sort data by three columns

    Hello SMITH.CRYSTAL,

    Your description of the problem is too general to provide you with specific answers. You will need to post a workbook with before and after examples.

    Please change or redact any private, confidential, or sensitive information prior to posting.

    How To Post Your Workbook
    1. At the bottom right of the Reply window, Click the button Go Advanced
    2. At the top of the Your Message Window, in the first row of icons, Click the Paperclip icon.
    3. Click the Add Files button at the top right in the dialog box. This displays the File Manager dialog.
    4. Click the Select Files button at the bottom middle of the dialog.
    5. In the new window Find the file you want to upload, select it, and Click Open.
    6. You will now be back in the File Manager dialog. Click the bottom Middle button Upload File.
    7. Wait until the file has completely uploaded before you exit the File Manager dialog.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    04-02-2012
    Location
    Kansas
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Creating a Macros or VBA to auto sort data by three columns

    I changed all information but the formats and column headers are all the same. I need a macros/VBA to go from Original to Final. Thanks.
    Attached Files Attached Files
    Last edited by SMITH.CRYSTAL; 07-14-2015 at 01:30 PM.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Creating a Macros or VBA to auto sort data by three columns

    Hello SMITH.CRYSTAL,

    The attached workbook has the macro below added to it. The macro name is Reformat. This format the worksheet, sort it using the 3 columns you mentioned, and adds the header and footer.

    Macro code...
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-02-2012
    Location
    Kansas
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Creating a Macros or VBA to auto sort data by three columns

    Thanks! That works perfect.
    Last edited by SMITH.CRYSTAL; 07-17-2015 at 08:33 AM.

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Creating a Macros or VBA to auto sort data by three columns

    Hello SMITH.CRYSTAL,

    You're welcome.

    To add a shortcut key...
    1. Open the workbook in Excel.
    2. Press ALT+F8 to open the Macro Dialog Box.
    3. Reformat should be highlighted in the list. If not then left click on the macro's name.
    4. Left Click on the Options... button or press ALT+O..
    5. The cursor will be blinking in an empty box with CTRL+ next to it. This is for the shortcut key.
    6. Type in any character, number, or letter you want to use for the shortcut key.
    7. You can add a short description of what the macro does in the box labeled Description:
    8. Click OK

+ 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. Auto creating a chart using macros.
    By chiefcheevs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-10-2015, 11:03 AM
  2. Auto Data Sort (Programming without VB , Macros or Pivots
    By jaysknots in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 10-22-2014, 03:18 PM
  3. Creating an auto sort without enabling Macros
    By lmonroe in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-22-2014, 03:04 PM
  4. Auto Sort of Data (Words) in Columns
    By recepkendir1 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-12-2013, 03:36 PM
  5. auto sort data in one column and apply sorting to all columns
    By lmonroe in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-03-2013, 08:18 PM
  6. Creating Macros in Excel to Sort/copy/paste and Analyze
    By AGilliland in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2011, 02:25 PM
  7. Need help building macro to auto sort two columns of data
    By staralfur in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-12-2011, 01:37 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