+ Reply to Thread
Results 1 to 6 of 6

Auto Sort Macro

  1. #1
    Registered User
    Join Date
    04-16-2012
    Location
    Alexandria, VA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Auto Sort Macro

    Hi!

    I have never used a macro before but am hoping to start because sorting this spreadsheet is beginning to drive me wild!

    I am hoping to sort by:

    1) Review Status (Pending, Data Collection, Analysis, Decision, Implementation -- in that order)
    2) Office (CBA)
    3) Program (ABC)


    Any ideas on a macros I can use to make this happen? Most of the entire spreadsheet is VLOOKUPs and the Review status is color coded. I have been sorting on values and color (Review Status) to make this work.

    A sanitized portion of the spreadsheet is attached.

    Thanks in advance for any help!

    Excel Sort Help.xlsx

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Auto Sort Macro

    How about this which is just a normal module...

    Looks like you had row two as jus blank so I removed it. In column L, I use a helper column to establish the order of the "Review Status".

    In that helper column biggining with L2 and copied down...

    =LOOKUP(K2,{"Analysis","Data Collection","Decision","Implementation","Pending"},{3,2,4,5,1})

    Please Login or Register  to view this content.
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    04-16-2012
    Location
    Alexandria, VA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Auto Sort Macro

    Hi Jeff!

    Thanks so much for the prompt reply! With a tiny bit of easy tweaking it worked! The only thing that is a little off is that ABC order for the review status is not the correct order. I will fix this by adding a number in front of the status in the spreadsheet that the data is pulled from and change it to sort in descending order. Coincidentely, the number will coincide with the phase of the process so this is just perfect!

    Thanks again!

    You rock,

    lindsay

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Auto Sort Macro

    Hi Lindsay,

    Glad it works out for you and you are very welcome. Thanks for the feedback.

    ================================================================

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  5. #5
    Registered User
    Join Date
    08-31-2012
    Location
    Delaware, USA
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Auto Sort Macro

    Hi,

    Depending how you are using the data -- Excel 2010 allows you to make a pivot table and then add 3 Slicers to it. They could be Status, Office, and Program. This would allow anyone to filter the data by "button". If the pivot table includes the money column, each filter will give appropriate value.

    Terry

  6. #6
    Registered User
    Join Date
    04-16-2012
    Location
    Alexandria, VA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Auto Sort Macro

    Hi Terry,

    A pivot table wouldn't work well because a lot of the data is wordy. I sanitized the selection that I shared because of the procurement sensitive nature of the data, but that's just a snip of a large inventory with lots of description-heavy data. However, I am not familiar with slicers and am always looking to snaz up my pivot tables so I will look into them!

    Thanks!

    L

+ 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