+ Reply to Thread
Results 1 to 2 of 2

Split cells and insert new row when cell contains a comma

  1. #1
    Registered User
    Join Date
    01-12-2009
    Location
    Gothenburg, Sweden
    MS-Off Ver
    Excel 2003
    Posts
    15

    Split cells and insert new row when cell contains a comma

    I'm trying to write a macro which searchs for a comma in every cell in column A.

    If a comma is found in the cell it is suppose to duplicate the row and insert it just below.

    So if the string in cell A5 is "5562288851, 5562030576", row 5 should be duplicated and inserted between row 5 and 6. And this should be checked on all rows containing data in column A.

    The SEARCH/FIND-functions does not work in VBA, how am I suppose to make this possible?

    Thanks in advance, a happy hobbyist from Sweden.

  2. #2
    Registered User
    Join Date
    05-02-2004
    MS-Off Ver
    2007
    Posts
    43
    You can use .Find in VBA, have a look at:

    http://www.thecodenet.com/articles.php?id=18

    TJ

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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