+ Reply to Thread
Results 1 to 3 of 3

Macro to rearrange cells based on numerical order

  1. #1
    Registered User
    Join Date
    03-22-2010
    Location
    Harrison, AR
    MS-Off Ver
    Excel 2007
    Posts
    10

    Question Macro to rearrange cells based on numerical order

    I have a spreadsheet setup for 4 different points of data. Each set of data includes up to 24 numbers. The sets are in the spreadsheet as such, C6:N7, C8:N9, C10:N11, C12:N13. What I would like to happen is when a macro is run to look at each set of data and place them rearrange them numerically based on the highest number in hte set. The cell structure will not change. So the sets will still reside in the same sections of the spreadsheet, i.e. C6:N7, C8:N9, C10:N11, C12:N13. I need the lowest set of numbers first and up from there. Ex. if you eneted 100, 200, 300, 400, 500 etc. in the first section,C6:N7. And then 1, 2, 3, 4, 5 etc. in the next section, C8:N9, the macro would then rearrange the set so that the lower numbers fell in the cells C6:N7, and the larger fall into C8:N9. Keeping in mind there can be up to four sets of numbers. Also there are going to be titles for each set of data in C5, D5 etc. that will need to follow the sets of data.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to rearrange cells based on numerical order

    How about a sample workbook showing BEFORE / AFTER examples of what you're needing. Make sure you represent all the hurdles to overcome and represent the layout (including surrounding areas) properly.

    Click GO ADVANCED and use the paperclip icon to post up a desensitized copy of your workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Macro to rearrange cells based on numerical order

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!

    Read this to understand why we ask you to do this.
    Remember what the dormouse said
    Feed your head

+ 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