+ Reply to Thread
Results 1 to 8 of 8

Convert text from rows to word in columns using VBA

  1. #1
    Registered User
    Join Date
    04-11-2020
    Location
    X
    MS-Off Ver
    Excel for Mac
    Posts
    3

    Convert text from rows to word in columns using VBA

    Hello everyone!

    I have product reviews from customers in rows in excel. I've used Text to Columns and now each word is in a separate column with one review per row:

    Screenshot 2020-04-16 at 09.45.39.png

    Please help me out with a code that transposes rows to columns. I need all words to be in column A like this:

    Screenshot 2020-04-16 at 09.47.01.png

    Thank you very much for your help!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,918

    Re: Convert text from rows to word in columns using VBA

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    04-11-2020
    Location
    X
    MS-Off Ver
    Excel for Mac
    Posts
    3

    Re: Convert text from rows to word in columns using VBA

    Thanks for the instructions! I've attached the excel.
    Attached Files Attached Files

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,918

    Re: Convert text from rows to word in columns using VBA

    Insert a new sheet in your workbook and name it Sheet1

    Please Login or Register  to view this content.

    How to install your new code
    • Copy the Excel VBA code
    • Select the workbook in which you want to store the Excel VBA code
    • Press Alt+F11 to open the Visual Basic Editor
    • Choose Insert > Module
    • Edit > Paste the macro into the module that appeared
    • Close the VBEditor
    • Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)


    To run the Excel VBA code:
    • Press Alt-F8 to open the macro list
    • Select a macro in the list
    • Click the Run button

  5. #5
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: Convert text from rows to word in columns using VBA

    Please Login or Register  to view this content.
    see example
    Attached Files Attached Files
    Click the * Add Reputation below to say thanks.

  6. #6
    Registered User
    Join Date
    04-11-2020
    Location
    X
    MS-Off Ver
    Excel for Mac
    Posts
    3

    Re: Convert text from rows to word in columns using VBA

    I've tested the codes and both do the job.
    Thank you very much dotchiejack and alansidman!

  7. #7
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: Convert text from rows to word in columns using VBA

    Thanks for the feedback

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,918

    Re: Convert text from rows to word in columns using VBA

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. [SOLVED] How to convert rows in text file into columns in excel sheet
    By MoonLaf in forum Excel General
    Replies: 9
    Last Post: 10-16-2019, 11:27 AM
  2. Convert Text (in rows) to Excel (columns and rows)
    By Marlon123 in forum Excel General
    Replies: 3
    Last Post: 08-24-2015, 01:17 PM
  3. convert word text to excel time
    By mat24 in forum Excel - New Users/Basics
    Replies: 10
    Last Post: 04-27-2010, 11:51 AM
  4. Importing Word text into rows and columns
    By Pualy in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 10-10-2008, 06:14 AM
  5. [SOLVED] Convert Excel rows to pages in Word
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-01-2006, 07:20 PM
  6. Convert Text in Excel To Word Doc
    By sunny1 in forum Excel General
    Replies: 1
    Last Post: 08-31-2005, 06:05 PM
  7. convert number to word (text)
    By ROHIT in forum Excel General
    Replies: 3
    Last Post: 07-20-2005, 09:05 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