+ Reply to Thread
Results 1 to 5 of 5

VBA separation of a column's values into three columns

  1. #1
    Registered User
    Join Date
    02-15-2019
    Location
    Athens, Greece
    MS-Off Ver
    2013
    Posts
    32

    VBA separation of a column's values into three columns

    Hello,

    I have a situation.
    I have been using this code for some errors and line spliting.

    Please Login or Register  to view this content.
    Now the lines are different and they are like this

    doiranis 92 Athens 19953 Attica
    Agiou Grigoriou 25 peiraias 15868 Attica
    patriarxou gerasimou 25 Velimaxi 85847 Arcadia

    Now i want to split them into three columns.
    On the first column must appear
    e.g
    doriranis 92
    On the second column
    Athens
    and on the third 19953

    e.g 2
    column 1:
    Agiou Grigoriou 25
    Column 2:
    peiraias
    column 3:
    15868

    Can someone please help me? I am completely stuck.
    Thanks in advance.
    Last edited by manosalexo; 03-01-2019 at 04:01 PM.

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,913

    Re: VBA separation of a column's values into three columns

    You could use Regular expression.

    Ex:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    02-15-2019
    Location
    Athens, Greece
    MS-Off Ver
    2013
    Posts
    32

    Re: VBA separation of a column's values into three columns

    Quote Originally Posted by CK76 View Post
    You could use Regular expression.

    Ex:
    Please Login or Register  to view this content.
    Almost.
    As i can see you use make every value to be printed onto the next column but on column C text and value must be separate
    e.g Column C: Athens
    Column D: 19953

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: VBA separation of a column's values into three columns

    Change the pattern
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  5. #5
    Registered User
    Join Date
    02-15-2019
    Location
    Athens, Greece
    MS-Off Ver
    2013
    Posts
    32

    Re: VBA separation of a column's values into three columns

    Quote Originally Posted by YasserKhalil View Post
    Change the pattern
    Please Login or Register  to view this content.
    That did the trick. Thanks a lot!

+ 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: 3
    Last Post: 08-07-2018, 10:14 AM
  2. Replies: 3
    Last Post: 05-18-2016, 12:03 PM
  3. [SOLVED] Column Separation Question
    By carlton7372 in forum Excel General
    Replies: 3
    Last Post: 12-10-2015, 12:23 PM
  4. [SOLVED] separation of data from one column to others
    By anindya.zen in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-23-2014, 04:46 AM
  5. Compare 2 columns and copy new values from the 2nd columns to a 3rd column
    By djarcadian in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-02-2013, 12:18 PM
  6. [SOLVED] All data in one column with comma separation
    By Test123Test in forum Excel General
    Replies: 6
    Last Post: 04-22-2013, 08:49 PM
  7. Replies: 2
    Last Post: 11-11-2008, 11:19 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