+ Reply to Thread
Results 1 to 12 of 12

How to transpose column A to Multiple rows?

  1. #1
    Registered User
    Join Date
    07-16-2013
    Location
    ireland
    MS-Off Ver
    Excel 2003
    Posts
    5

    How to transpose column A to Multiple rows?

    Hi there,

    I have the following database format in column A in excel 2007:

    Number
    Name
    Name
    Exhibitor
    City
    Country
    Descrip
    Place
    2012
    2013
    <space>
    Number
    Name
    Name
    Exhibitor
    City
    Country
    Descrip
    Place
    2012
    2013
    <space>

    and so on...


    I would like to get it into multiple rows so it would look as follows:

    number name exhibitor city country description place 2012 2013
    number name exhibitor city country description place 2012 2013

    Can anyone help me figure this out? I'm struggling!


    Lyanne
    Last edited by lyanneryan; 07-16-2013 at 11:22 AM.

  2. #2
    Registered User
    Join Date
    07-16-2013
    Location
    ireland
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How to transpose column A to Multiple rows?


  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How to transpose column A to Multiple rows?

    The easiest way that I know of is to copy your data into Word. Use the Search and Replace to insert tabs between each field entry and have a paragraph mark at the end of each record.

    With an actual replica of your data as it really is, I could probably give you very specific directions on how to do this.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Registered User
    Join Date
    07-16-2013
    Location
    ireland
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How to transpose column A to Multiple rows?

    I think i need to run a macro on it - however I don't know how to write macros!

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: How to transpose column A to Multiple rows?

    Lyanne,
    Please attach a sample (Excel book), including your desired result. To attach a sample, go to advance then attachment.

  6. #6
    Registered User
    Join Date
    07-16-2013
    Location
    ireland
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How to transpose column A to Multiple rows?

    Test Excel Forum Dummy.xlsx

    This is an example of the database I am working with at the moment.

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to transpose column A to Multiple rows?

    Try this code -
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose Tools | Macro | Macros
    Select a macro in the list, and click the Run button
    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]

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to transpose column A to Multiple rows?

    As per your sample file, try this code -
    Please Login or Register  to view this content.

  9. #9
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How to transpose column A to Multiple rows?

    Or this formula approach

    In Sheet 2 insert your headers, you can do this by copying the first block then Paste Special > Transpose

    Then in A2 this CSE array formula, this must be confirmed with Ctrl+Shift+Enter not just Enter before dragging across and down.

    Your profile States 2003 but your file is 2007 or above, the solution is for 2003, it can be simplified for 2007 and above.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  10. #10
    Registered User
    Join Date
    07-16-2013
    Location
    ireland
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How to transpose column A to Multiple rows?

    Hi Marcol,

    Thanks so much for your help. In terms of the formula approach. Could you please break down how you did that? The CSE formula?

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: How to transpose column A to Multiple rows?

    VBA
    Please Login or Register  to view this content.

  12. #12
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How to transpose column A to Multiple rows?

    Break down of the CSE array
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    INDEX(IF(Data!$A$1:$A$1000=A$1,ROW(Data!$A$1:$A$1000),""),,) is the part that is the array.

    The IF() statement states that if any cell in A1:A1000 = the header (A$1) then return the row number, if not then return a blank "".

    So INDEX(the if statement,,) returns a series array of blanks and numbers
    As there is only one column in the array we could equally write INDEX(the if statement,,1)

    We can then use SMALL() to extract only the row numbers using ROWS($2:2) as an incremental counter.
    This is wrapped again in INDEX(desired column, SMALL() gives the row )

    If this cell in the data is blank then it will return 0, so to suppress this we use an IF() statement to return "" instead of zero.

    With 2003 we can use COUNT(the array) and ROWS() to end the returned results, to shorten the formula rather than use If(ISERROR()), in 2007 IFERROR() does the job.

    See this workbook I have added a 2007 solution that returns blanks when the data is blank.
    Attached Files Attached Files
    Last edited by Marcol; 07-18-2013 at 07:53 AM.

+ 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. Transpose Multiple Rows into a Single Column
    By vnascimento in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-04-2013, 08:47 AM
  2. [SOLVED] How to transpose one column into multiple rows and columns?
    By Raoul Gonzo in forum Excel General
    Replies: 4
    Last Post: 01-15-2013, 11:00 AM
  3. How can I transpose multiple rows into one column.
    By Doodie in forum Excel General
    Replies: 5
    Last Post: 12-16-2012, 08:47 AM
  4. Transpose multiple rows into one column
    By lucidglassj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-17-2011, 11:04 AM
  5. Multiple Transpose from Same column to different rows and colums.
    By marc5354 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-20-2010, 06:14 PM

Tags for this Thread

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