+ Reply to Thread
Results 1 to 4 of 4

Find and swap data

  1. #1
    Registered User
    Join Date
    05-21-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    2

    Find and swap data

    Hi guys,

    Supposed the original data is shown as below, with each name assigned with a score in each row.

    A B C D E F G H

    John 3 Mary 2 Paul 2 Peter 1 (In round #1, John got "3", Mary got "2" etc)

    Mary 4 Peter 3 John 4 Paul 1 (In round #2, John got "4", Mary got "4" etc)


    Is there any way I can rearrange the order of the data so that for each row, Peter and his score will come first, then Mary and her score, then Paul and his and then John's? (desired outcome as shown below)

    A B C D E F G H

    Peter 1 Mary 2 Paul 2 John 3 (correspond to round #1 above)

    Peter 3 Mary 4 Paul 1 John 4 (correspond to round #2 above)

    Many Thanks for your help! I really appreciate it!

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Find and swap data

    You would likely need to post an example with an excel workbook for me to assist. Can you create an example with sample data and a desired outcome?
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Registered User
    Join Date
    05-21-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    2

    Re: Find and swap data

    Hi ,

    Thank you very much for your reply.

    In the attached file, you will find the original data and the desire outcome.

    I am trying to rearrange original data so that for each row, each name and the according score will be shown with the order "Peter and his score, Paul and his score, Mary and her score and then John and her score".

    Thank you for your help in advance!!
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Find and swap data

    You'll proibably have to adjust this

    In A14-A17 put the names Peter, Paul, Mary, John (the order in which you want them)

    in B14
    =INDEX($B2:$I2,1,MATCH(INDIRECT("A"&INT(COLUMN()/2)-1+14),$B2:$I2,0))
    in C14
    =INDEX($B2:$I2,1,MATCH(INDIRECT("A"&INT(COLUMN()/2)-1+14),$B2:$I2,0)+1)

    Select B14:C14 and copy
    Now paste across to D14:I14
    Select B14:I14 and copy
    Paste down as far as row 16
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

+ 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. How to swap data series values on a chart
    By Kucu in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-02-2013, 04:19 AM
  2. swap data around in one cell
    By neilpateluk in forum Excel General
    Replies: 3
    Last Post: 03-24-2009, 11:37 AM
  3. Swap data from one cell to another
    By Brooks W. in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-16-2005, 11:06 AM
  4. FIND or LEFT or MID to swap first name with last name?
    By Alice in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-14-2005, 07:06 PM
  5. [SOLVED] Is there a quick shortcut to swap the data in two cells?
    By eburris in forum Excel General
    Replies: 1
    Last Post: 01-13-2005, 08:06 PM

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