+ Reply to Thread
Results 1 to 8 of 8

convert file of repeating 5 rows into a file of 5 columns

  1. #1
    Registered User
    Join Date
    02-06-2008
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    71

    convert file of repeating 5 rows into a file of 5 columns

    a nursery has an availability list with all their products in a file with each product described by 5 rows of information. the file includes 500+ products. how can I convert it into a file of 5 columns which would be very useful to me. this is an example of the 5 rows -

    botanic name 1
    common name 1
    size of plant 1
    quantity in stock 1
    price 1
    botanic name 2
    common name 2
    size of plant 2
    quantity in stock 2
    price 2
    botanic name 3
    common name 3
    size of plant 3
    quantity in stock 3
    price 3

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,893

    Re: convert file of repeating 5 rows into a file of 5 columns

    Hi. Assuming your data are in a1 and below, try this:

    =INDEX($A$1:$A$15,COLUMNS($B$1:B1)+ROWS($B$1:B1)*5-5)

    Drag down & right
    Last edited by Glenn Kennedy; 01-04-2015 at 04:12 PM.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: convert file of repeating 5 rows into a file of 5 columns

    rgrstvr.xlsm

    See Attached

  4. #4
    Registered User
    Join Date
    02-06-2008
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    71

    Re: convert file of repeating 5 rows into a file of 5 columns

    I tried it and this is what happened -

    Abronia maritima Abronia maritima
    Sand Verbena Abronia umbellata Pink Sand Verbena 1 gallon (1g) 7.99
    1 gallon (1g) Abronia villosa Desert Sand Verbena 1 gallon (1g) 7.99
    7.99 #REF! #REF! #REF! #REF!
    5 #REF! #REF! #REF! #REF!
    Abronia umbellata #REF! #REF! #REF! #REF!
    Pink Sand Verbena #REF! #REF! #REF! #REF!
    1 gallon (1g) #REF! #REF! #REF! #REF!
    7.99 #REF! #REF! #REF! #REF!
    - #REF! #REF! #REF! #REF!
    Abronia villosa #REF! #REF! #REF! #REF!
    Desert Sand Verbena #REF! #REF! #REF! #REF!
    1 gallon (1g) #REF! #REF! #REF! #REF!
    7.99 #REF! #REF! #REF! #REF!

  5. #5
    Registered User
    Join Date
    02-06-2008
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    71

    Re: convert file of repeating 5 rows into a file of 5 columns

    apparently I do not know how to see an attached file.

  6. #6
    Registered User
    Join Date
    02-06-2008
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    71

    Re: convert file of repeating 5 rows into a file of 5 columns

    ok - figured out how to get the attachments - just click on the items at the bottom of your response - thank you, I will try to figure them out.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: convert file of repeating 5 rows into a file of 5 columns

    Another approach.

    Assuming you have the "names" in column A and some sort of value/additional data in column B, use column C as a helper column as shown below....

    A
    B
    C
    D
    E
    F
    G
    H
    I
    1
    botanic name
    1
    botanic name 1 botanic name common name size of plant quantity in stock price
    2
    common name
    1
    common name 1
    1
    1
    1
    1
    1
    3
    size of plant
    1
    size of plant 1
    2
    2
    2
    2
    2
    4
    quantity in stock
    1
    quantity in stock 1
    3
    3
    3
    3
    3
    5
    price
    1
    price 1
    6
    botanic name
    2
    botanic name 2
    7
    common name
    2
    common name 2
    8
    size of plant
    2
    size of plant 2
    9
    quantity in stock
    2
    quantity in stock 2
    10
    price
    2
    price 2

    C1=A1&+" "&COUNTIF($A$1:A1,A1) copied down.

    Then in E1:I1, copy/type the 5 headings, and then...
    E2=IFERROR(INDEX($B$1:$B$15,MATCH(E$1&" "&ROW(A1),$C$1:$C$15,0)),"")
    copied down and across.

    You can hide the helper (column C?) if needed
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,893

    Re: convert file of repeating 5 rows into a file of 5 columns

    Your comments at Post 4 - who were they for? If your problem is not solved, please attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

+ 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. Replies: 0
    Last Post: 04-11-2013, 04:42 PM
  2. Master file without repeating rows
    By nccool in forum Excel General
    Replies: 2
    Last Post: 01-29-2013, 09:44 AM
  3. Replies: 6
    Last Post: 12-06-2012, 11:05 AM
  4. [SOLVED] Convert Repeating Fields (Columns) to Rows
    By KQ3884 in forum Excel General
    Replies: 1
    Last Post: 04-05-2012, 02:47 PM
  5. Convert columns into rows with a repeating attribute
    By shaunriordan in forum Excel General
    Replies: 0
    Last Post: 10-19-2011, 01:12 AM

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