+ Reply to Thread
Results 1 to 4 of 4

Sorting Macro

  1. #1
    Registered User
    Join Date
    06-12-2012
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2010
    Posts
    54

    Sorting Macro

    Friends,

    This is a small portion of a large worksheet I have going...
    fasd.jpg

    I have a userform that allows a user to select a sort criteria like "Ascending Price" etc.

    Upon OKButton click I need a Macro that will shift the rows around accordingly.

    I don't even know where to start with getting this done... Any suggestions would be greatly appreciated.

    Thanks,


    Mike

  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: Sorting Macro

    Its better to attach a sample excel file instead of a jpg.
    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
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: Sorting Macro

    So you have created this user form already? If so youll need the name of your text box. Then make an OK button double click it. This code will execute when the user hits 'ok'. The easiest way to make a sorting macro is to record it.

    1. Go to view
    2. the very right should say macros, click the little arrow below it
    3. click record macro and name it
    4. while recording select the range and then do a sort int he data tab.
    5. stop the recording
    6. put the sort macro into the OK button code, change the criteria to textbox.txt (make textbox the name of your text box)

  4. #4
    Registered User
    Join Date
    06-12-2012
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: Sorting Macro

    My apologies, Arlu

    Thanks Gaiden, I got it figured out.

+ 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