+ Reply to Thread
Results 1 to 8 of 8

I want to learn how to use macros to change vertical data to horizontal data

  1. #1
    Registered User
    Join Date
    05-22-2009
    Location
    Southampton, NY
    MS-Off Ver
    Excel 2003
    Posts
    29

    I want to learn how to use macros to change vertical data to horizontal data

    Hey folks! So, I've done about two hours of the google-ing... and, I still can't quite figure out how to make this happen. Often, we receive data in vertical columns that we need transferred to horizontal rows so that we can break them down. Here is what I have:
    Name
    Street Address
    City, State Zip
    Country
    Phone
    Fax


    I'm hoping to switch this to horizontal, so that Column A is all Name, B is all Street Address, C is all City, State Zip, and so on.... It appears that each school is separated by a blank, so technically if the macro could find the blank, then reset back to Column A, we're in business. I wish I knew how to do these without having to ask for help, but every time I look something up, I just can't make sense of it. Furthermore, when I try to record a macro, it never gets me the desired result.

    I greatly appreciate any help anyone can offer. I'm completely overwhelmed, as usual, during the holidays and all, and I hate it. I refuse to be a Grinch...

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: I want to learn how to use macros to change vertical data to horizontal data

    This is quite easy really.

    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
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    05-22-2009
    Location
    Southampton, NY
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: I want to learn how to use macros to change vertical data to horizontal data

    Alright, I think I got this....Book2.xlsx

    Basically, the only variables we have going on are:
    -Some have a couple of blanks between one listing, and the next
    -Some have a phone/fax, some only have phone

    However, like I said, I'd imagine that the macro can find the blank, then know a new listing begins...

    Thanks!

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

    Re: I want to learn how to use macros to change vertical data to horizontal data

    SeanEboy,
    Try the attached.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: I want to learn how to use macros to change vertical data to horizontal data

    Try this macro:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    05-22-2009
    Location
    Southampton, NY
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: I want to learn how to use macros to change vertical data to horizontal data

    You are a magician... Unfortunately, I'm still trying to figure out how exactly it works.

    Worked PERFECTLY on the sheet I was playing with.

    Now, another one... Except, this one appears to have different data structure as there are blanks within the same record, AND different amounts throughout. Close to being uniform, but not quite. Book5.xlsx


    I really appreciate this! I am trying to learn how to work with macros to organize mailing lists for my small business. Excel is so amazing, I want to marry it.

  7. #7
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: I want to learn how to use macros to change vertical data to horizontal data

    Your sample does not read true.

    Can you paste your true data.

    I think that the entries are fixed lengths 15 rows.

  8. #8
    Registered User
    Join Date
    05-22-2009
    Location
    Southampton, NY
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: I want to learn how to use macros to change vertical data to horizontal data

    I actually made it happen with another macro I had going. Basically, most of the records had (10) cells, however some only had (9), which the macro didn't like so much. However, luckily only about a dozen had (9) cells, so I was able to find them by letting the macro run until the records skewed, then fixed it from then on.

+ 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. Transposing repeating vertical data to horizontal data but retaining unique values only
    By mgcarino14 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2014, 12:57 AM
  2. [SOLVED] Change data from vertical format to horizontal format
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2013, 07:06 PM
  3. [SOLVED] Change horizontal data into vertical data
    By Motor1 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-20-2012, 05:41 AM
  4. Replies: 5
    Last Post: 04-23-2010, 08:01 AM
  5. Change data from vertical to horizontal?
    By excelldummy in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 09-13-2009, 01:31 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