+ Reply to Thread
Results 1 to 5 of 5

Can anyone please advise how to auto-rearrange rows of data, based on desired arrangement?

  1. #1
    Registered User
    Join Date
    08-20-2012
    Location
    Singapore
    MS-Off Ver
    Microsoft Office Excel 2007 SP3
    Posts
    3

    Can anyone please advise how to auto-rearrange rows of data, based on desired arrangement?

    Can anyone please advise how to auto-rearrange rows of data, based on desired arrangement?
    I would like to automate the process using Excel VBA/Macros.

    For example, the data I have is:

    Fruit Name,Jan Sales,Feb Sales
    apple,130,1350
    banana,200,2300
    jackfruit,260,750
    mango,40,430
    papaya,120,2100
    pear,300,780

    I would like to rearrange the "Fruit Name" according to:

    Fruit Name
    banana
    apple
    pear
    papaya
    mango
    jackfruit

    My desired output is the following, based on the desired "Fruit Name" arrangement.

    Fruit Name,Jan Sales,Feb Sales
    banana,200,2300
    apple,130,1350
    pear,300,780
    papaya,120,2100
    mango,40,430
    jackfruit,260,750

    I had attached an excel file of the example.

    Please advice.
    Thanks a lot!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    09-29-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2003/2007
    Posts
    182

    Re: Can anyone please advise how to auto-rearrange rows of data, based on desired arrangem

    Hi,

    Use Vlookup formula in B2 cell as below to get Jan sales.

    Please Login or Register  to view this content.
    Also use Vlookup formula in C2 cell as below to get Feb sales.

    Please Login or Register  to view this content.
    then drag the formula.

  3. #3
    Registered User
    Join Date
    08-20-2012
    Location
    Singapore
    MS-Off Ver
    Microsoft Office Excel 2007 SP3
    Posts
    3

    Re: Can anyone please advise how to auto-rearrange rows of data, based on desired arrangem

    It works!
    Didn't expect an Excel formula can accomplish this.
    Thank you so much taps.

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Can anyone please advise how to auto-rearrange rows of data, based on desired arrangem

    @ richardlimka

    Please update your profile to show what version of Excel you use and your location. Each may have a bearing on the responses you'll receive (formula availability/regional settings).

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  5. #5
    Registered User
    Join Date
    08-20-2012
    Location
    Singapore
    MS-Off Ver
    Microsoft Office Excel 2007 SP3
    Posts
    3

    Re: Can anyone please advise how to auto-rearrange rows of data, based on desired arrangem

    Hi Cutter,

    Thanks for the reminder.
    I had just updated my profile with my Excel version & location.
    I had also clicked on the small star icon to show my appreciation.

    Cheers!

+ 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