+ Reply to Thread
Results 1 to 6 of 6

Advanced Transpose

  1. #1
    Registered User
    Join Date
    09-19-2011
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    2

    Advanced Transpose

    Hi all,

    I'm wondering if you can help me. I'm trying to move some data about and I seem to have hit a brick wall. I've got a data file which looks something like this:

    \1

    I'm trying to get it to look like this:

    \1

    I've tried using the transpose function, but I think this might need something a bit more advanced.

    Can anyone offer any suggestions please?

    Thanks,

    GavM

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Advanced Transpose

    Hello,

    see attached.
    Attached Images Attached Images

  3. #3
    Registered User
    Join Date
    09-19-2011
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Advanced Transpose

    Thanks for that.

    My apologies for not posting a workbook, I just realised how awkward it is to post an image of a spreadsheet!

    I've tried that formula, and it almost works. I'd like Sheet1 to end up looking like Sheet3 if possible.

    Any suggestions?

    Again, thanks very much for your help.

    - GavM
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Advanced Transpose

    Are the numbers of values in Record and Field flexible (i.e. can there be more than 1,2,3)?

    If you have your headers in first row and column, this in B2 and down/across:

    =INDEX(Sheet1!$C$2:$C$10,MATCH(1,IF(Sheet1!$A$2:$A$10=$A2,IF(Sheet1!$B$2:$B$10=B$1,1)),0))

    It's an array formula so enter with ctrl+shift+enter.
    Last edited by StephenR; 09-20-2011 at 11:50 AM.

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Advanced Transpose

    Pl see attached file. Sheet2 contains data after running T_pose macro.
    In the macro For loop is 1 to 4,because repetetion after every 5 rows.pl change according to your requirement.
    Feel free to clarify.
    Thanks.
    Attached Files Attached Files

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

    Re: Advanced Transpose

    Run this macro on your Sheet1. It will create a table off to the right and will work with any number of values in column A and column B. All values do not have to exist for the table. For instance, just add one more row to your table for 4, 2, "r" and see what happens.
    Please Login or Register  to view this content.
    _________________
    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!)

+ 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