+ Reply to Thread
Results 1 to 8 of 8

Vertical to Horizontal Data Special Conditions

  1. #1
    Registered User
    Join Date
    05-05-2011
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    11

    Vertical to Horizontal Data Special Conditions

    I am using some data scraping software to get all the image urls from the site so I can use them in my other database. Here is the problem the data is coming in vertically and I need it horizontally "well use transpose" yes works but there are about 53,000 images and do not want to go through it one line at a time. I would like to use a macro for this. Here is what I have and what I need the finished product to look like.


    SKU 1
    Image1
    Image2
    Image3
    Image4
    Image5
    SKU 2
    Image1
    Image2
    Image3
    Image4
    Image5
    Image6
    Image7
    SKU 3
    Image1
    Image2


    Needs to be like this:

    SKU 1 | Image1 | Image2 | Image3 | Image4| Image5
    SKU 2 | Image1 | Image2 | Image3 | Image4 | Image5 | Image6 | Image7
    SKU 3 | Image1 | Image2


    The number of images change any where from 1 - 19 images per sku.

    I hope I explained this well enough!
    Any help would be much appreciated.

    Thanks,
    Guy
    Last edited by guypier; 05-05-2011 at 04:12 PM.

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

    Re: Vertical to Horizontal Data Special Conditions

    Can you post a small sample workbook?

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

    Re: Vertical to Horizontal Data Special Conditions

    This should do it:

    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!)

  4. #4
    Registered User
    Join Date
    05-05-2011
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Vertical to Horizontal Data Special Conditions

    Here is a download to the file from my server http://www.pixeleightmedia.com/Data.xls

    Thank You

  5. #5
    Registered User
    Join Date
    05-05-2011
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Vertical to Horizontal Data Special Conditions

    The macro worked but it in not formatted the right way.

    The macro you gave me:
    SKU | image | image | image | SKU | image etc...

    needs to be:

    SKU | image | image | image | image
    SKU | image | image
    SKU | image | image | image | image | image | image
    SKU | image | image | image


    Thank You
    Last edited by guypier; 05-05-2011 at 03:24 PM.

  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: Vertical to Horizontal Data Special Conditions

    First, please do not QUOTE my entire post, now the code that won't work is doubled in this thread. EDIT that post above and remove that, if you would...

    Hehe.. Your post #1 indicated SKU was at the start of each string, but that wasn't true. Always start with a sample workbook, eliminates mistakes like that. Here's the redone code:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    05-05-2011
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Vertical to Horizontal Data Special Conditions

    Ok fixed the quoted issue haha. Sorry about that. Ill try the code now.

  8. #8
    Registered User
    Join Date
    05-05-2011
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Vertical to Horizontal Data Special Conditions

    Ok officially tested. And...

    WORKS PERFECTLY... Thank you, you saved me a hell of a lot of time. I may have more things that will require macros ill be sure to ask you first.

    Thanks again,
    Guy Pierce

+ 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