+ Reply to Thread
Results 1 to 3 of 3

Sort Descending & back to Original Order - Two independent data sets

  1. #1
    Registered User
    Join Date
    04-24-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Question Sort Descending & back to Original Order - Two independent data sets

    Hi

    I was wondering if someone can help me with some macro wizardry for a Dashboard project. I’ve used the search function but could not find a full answer to my problem.

    I have cost data divided into two groups (direct/indirect expenses). In each of the cost groups there are two separate columns showing the percentage delta between 1) the previous year and the current run-rate and 2) the percentage change month-on-month.

    The goal is to enable the end user to sort both of these columns in descending order via a macro assigned to shapes. A third shape should undo the sorting and change the data back to original order.

    I am a beginner with macros and therefore have no idea how to accomplish this. Here is my attempt which is only one part of what I am trying to achieve.

    Sub sb_VBA_Sort_Data_Descending()
    With Worksheets("Data")
    Range("B4:H7").Sort _
    Key1:=Range("H3"), Order1:=xlDescending
    End With
    End Sub

    I would appreciate any help I could get.

    Thank you!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Sort Descending & back to Original Order - Two independent data sets

    Just a question;

    When I opened the file, I can not find any common order in any column between 2 lists.

    So,
    What do you mean by "Original order"?
    When user close the file without get them back to the "Original order", would "Original order" be the one with the last order they changed?
    Or is there any special order in your mind?

  3. #3
    Registered User
    Join Date
    04-24-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Sort Descending & back to Original Order - Two independent data sets

    Hi Jindon,

    Let me clarify what I meant by the order. The two data sets (Ranges B3:H7 and B11:H15) are currently not sorted. In my original file I pulled data from a table via SUMIFS into the format as you can see here.
    I now want the user to be able to independently sort descending based on column E and H. To be more precise the user can decide whether he wants the dataset sorted descending based on column E or column H. The icing on the cake would be to restore the original order, e.g. the order that existed before he started applying the filters. Hope my explanation provided some clarity.

    Thanks for looking at this!

+ 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] Formula to Sort the Data in Descending Order
    By Ankit_Kumar in forum Excel General
    Replies: 8
    Last Post: 04-27-2015, 07:48 AM
  2. Automatic sort by descending order
    By anapaulacasseta in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-15-2014, 10:49 PM
  3. macro to sort in ascending/descending order
    By apio in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-21-2012, 02:46 AM
  4. [SOLVED] Sort extracted data in descending order
    By Aland2929 in forum Excel General
    Replies: 5
    Last Post: 07-24-2012, 03:14 PM
  5. Can you sort a chart out in Ascending/Descending Order
    By dandavis1 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 11-26-2010, 09:52 AM
  6. Macro to sort data in descending order
    By Vbort44 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-02-2008, 11:46 PM
  7. Sort in descending order
    By shahcu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-28-2008, 03:01 AM

Tags for this Thread

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