+ Reply to Thread
Results 1 to 4 of 4

Splitting cell contents by lines

  1. #1
    Forum Contributor
    Join Date
    06-12-2006
    Location
    Portugal
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    212

    Splitting cell contents by lines

    Hello to all,

    Column B contains many lines of numbers, as per the following example:
    Line1 111222/145251
    Line2 333115
    Line3 777555/154154
    Line4 888999/115116
    Line5 110110
    Line6 110115
    Line7 620260/145521

    So numbers are always 6 digits long, sometimes separated by "/". I need to pass all data to columd D, in sets of 6 digits. In the present case all need to obtain 11 lines of all sets of 6 digits, without the slash.

    I wrote a small peace of code but my experience in VBA is too bad to tell and i'm obtaining blank cells on column D:
    Please Login or Register  to view this content.
    Can someone please let me know what am i doing wrong? (besides writing an horrible code, i know that because i'm not a programmer)

    Many thanks in advance for any kind help.
    Octavio

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Splitting cell contents by lines

    Hi Octavio,
    try this
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    05-30-2013
    Location
    France
    MS-Off Ver
    2010
    Posts
    260

    Re: Splitting cell contents by lines

    The Instr formula does not return a boolean (True/False) but the starting position of the string found. Try this instead :

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    06-12-2006
    Location
    Portugal
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    212

    Re: Splitting cell contents by lines

    Nilem, worked like a charm, i'm green with envy.
    Thanks a million.
    Octavio

+ 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. splitting multile lines in one cell into columns
    By m4rty5miff in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-11-2012, 08:53 AM
  2. splitting multiple lines in one cell into columns
    By m4rty5miff in forum Excel General
    Replies: 1
    Last Post: 02-10-2012, 12:15 PM
  3. Splitting cell contents
    By Jeshen in forum Excel General
    Replies: 6
    Last Post: 12-20-2011, 12:39 PM
  4. Splitting the contents of a cell
    By sheargraphix in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-14-2011, 07:11 AM
  5. Splitting cell contents
    By novodisc in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-12-2010, 04:49 PM

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