+ Reply to Thread
Results 1 to 7 of 7

VBA: convert cell data to column and vice versa

  1. #1
    Registered User
    Join Date
    12-27-2018
    Location
    London, England
    MS-Off Ver
    2007, 2010
    Posts
    39

    VBA: convert cell data to column and vice versa

    VBA: convert cell data to column and vice versa
    Two VBA codes help required.

    Example
    Input in Sheet1:
    column A2: Sam | Cell B1 data: a, 1Apple, Rose*
    column A3: Sam | Cell B1 data: a, Rose*

    Output in Sheet2:
    column A2: Sam | Cell B1 data: a
    column A2: Sam | Cell B1 data: 1Apple
    column A2: Sam | Cell B1 data: Rose*
    column A3: Sam | Cell B2 data: a
    column A3: Sam | Cell B2 data: Rose*

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: VBA: convert cell data to column and vice versa

    column A2: Sam | Cell B1 data: a
    column A2: Sam | Cell B1 data: 1Apple
    column A2: Sam | Cell B1 data: Rose*
    How the same cell could have 3 different values ...?
    Please attach an Excel sample, it will help!
    - Battle without fear gives no glory - Just try

  3. #3
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: VBA: convert cell data to column and vice versa

    Hi
    If I understand well

    Please Login or Register  to view this content.
    Last edited by mohadin; 10-13-2019 at 06:10 AM.

  4. #4
    Registered User
    Join Date
    12-27-2018
    Location
    London, England
    MS-Off Ver
    2007, 2010
    Posts
    39

    Re: VBA: convert cell data to column and vice versa

    PCI my example input is wrong. Apologies

    It will be
    If A2 cell data is say Sam1 then Cell B2 cell data will have a, Cell B3 cell data will have Apple, and Cell B4 cell data will have Rose*

  5. #5
    Registered User
    Join Date
    12-27-2018
    Location
    London, England
    MS-Off Ver
    2007, 2010
    Posts
    39

    Re: VBA: convert cell data to column and vice versa

    Thanks mohadin

  6. #6
    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,884

    Re: VBA: convert cell data to column and vice versa

    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.
    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

  7. #7
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: VBA: convert cell data to column and vice versa

    Hi vikim
    If the first code is What you need
    Then the second coed you should be
    Please Login or Register  to view this content.
    Let me know
    Last edited by mohadin; 10-13-2019 at 11:40 PM.

+ 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] Move data from column to table and vice versa.
    By luongthang1908 in forum Excel General
    Replies: 9
    Last Post: 07-22-2017, 02:44 AM
  2. How to swop data in a table with the column field and vice versa?
    By damienchew in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2014, 12:18 AM
  3. Convert Decimal fractions to binary and vice versa
    By vinbhoo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-11-2014, 11:04 AM
  4. Convert cell from months to hours (and vice versa) with Form Controls combobox
    By Dabble in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-22-2013, 02:17 PM
  5. [SOLVED] Convert cell from months to hours (and vice versa) with ActiveX combobox
    By Dabble in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-20-2013, 05:39 PM
  6. Function To Convert Liters To Imperial Gallons & Vice Versa
    By Dave Gibson in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-24-2005, 04:05 PM
  7. How to convert binary to decimal & vice versa?
    By hmmm in forum Excel General
    Replies: 5
    Last Post: 08-02-2005, 11:05 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