+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Sort multiple sheets, specific cells

  1. #1
    Registered User
    Join Date
    06-21-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Sort multiple sheets, specific cells

    I have many worksheets that include a table that has headings along row 10, data beginning with row 11, ending at row 1010. I often sort Column D (the Date Column) in ascending order. How can I create a macro that will sort multiple sheets at once? I'd like to be able to specify, for example, IF X7 contains "sort", then running the macro would sort the dates on all those sheets.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Sort multiple sheets, specific cells

    In which sheet will there be "sort" in X7? In all the sheets?

    Also, how about doing the sort on a click of a button?

    Are there any sheets that need to be excluded from the sort?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    06-21-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Sort multiple sheets, specific cells

    Quote Originally Posted by arlu1201 View Post
    In which sheet will there be "sort" in X7? In all the sheets?

    Also, how about doing the sort on a click of a button?

    Are there any sheets that need to be excluded from the sort?

    Some sheets will be excluded. I was hoping it would work to put "sort" in a specific cell on each sheet that needs to be sorted in order to distinguish those.
    Sorting on the click of a button would be ideal!

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Sort multiple sheets, specific cells

    Can you specify which sheets will be excluded?

  5. #5
    Registered User
    Join Date
    06-21-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Sort multiple sheets, specific cells

    Quote Originally Posted by arlu1201 View Post
    Can you specify which sheets will be excluded?
    There are several with various names such as "Summary", "Prep", "Bonus Only", etc.

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Sort multiple sheets, specific cells

    Try this code
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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