+ Reply to Thread
Results 1 to 5 of 5

Need help writing sorting macros

  1. #1
    Registered User
    Join Date
    02-12-2010
    Location
    Toms River, NJ
    MS-Off Ver
    Excel 2010
    Posts
    42

    Need help writing sorting macros

    I am working on a spreadsheet to help me with my finances. in the future I may offer it to others for a fee or I may give it away for free. I need help and I'm figuring that this is one of the best places to ask. I do not want code written but pointers to where I can learn how to do this because unless I learn how and why I won't be able to modify it in the future.

    The current spreadsheet is uploaded to this post the account names and values are not real just dummy values for now.

    What I want to do is add the following sort options

    1) Sort by Highest APR only
    2) Sort by Highest APR then util, % (example if two cards have a 18.99% Apr put the one that's closest to being max'ed out on the top)
    3) Sort by Utilization only.
    4) Sort by lowest balance

    I need the sort to ignore any cards where the amount owed is 0

    I do appreciate any help given.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    523

    Re: Need help writing sorting macros

    Would you consider using an Excel table (or list in Excel 2003) to do this? This puts arrows at the top of each column with various sort options.
    You would ideally delete the blank column E to do this to include the Util column.

    In Excel 2007, click on any cell containing the data you want to be able to sort and then 'Insert | Table'.
    Excel 365 user. To unblock a downloaded macro-enabled workbook, go to your "Downloads" folder > right click on the workbook name > click 'Properties' > check the 'Unblock' checkbox. You can now open the workbook.

  3. #3
    Registered User
    Join Date
    02-12-2010
    Location
    Toms River, NJ
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Need help writing sorting macros

    Quote Originally Posted by deadlyduck View Post
    Would you consider using an Excel table (or list in Excel 2003) to do this? This puts arrows at the top of each column with various sort options.
    You would ideally delete the blank column E to do this to include the Util column.

    In Excel 2007, click on any cell containing the data you want to be able to sort and then 'Insert | Table'.
    I have not considered a table only because if I do distribute this I want to make it simple for whoever is using it. I was going to have a radio button to run the sort function chosen.

  4. #4
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    523

    Re: Need help writing sorting macros

    OK.
    What I'd do is the following:
    1. Record a macro for each type of sort that you would like to run. So if for example you wanted to only sort by APR ascending and APR descending then you'd record 2 macros.
    2. Insert buttons or whatever type of control you want on the sheet containing data for each type of sortto
    3. Assign the relevant macro to each button as appropriate e.g. for a Sort APR ascending button, you'd assign the macro you recorded to do that type of sort.

    I'm sure that there are much more efficient methods- one of the many gurus here will likely improve on the above idea.

  5. #5
    Registered User
    Join Date
    02-12-2010
    Location
    Toms River, NJ
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Need help writing sorting macros

    Thanks for the suggestion. I will try that when I'm on my main PC. I dislike the Excel Starter edition that came on my laptop. It doesn't have the featues I need

+ 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