+ Reply to Thread
Results 1 to 5 of 5

split cells

Hybrid View

  1. #1
    Registered User
    Join Date
    05-08-2010
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    3

    split cells

    hello,

    I have a dataset like this:

    18abc.xls
    18abd.xls
    18ace.xls
    19abi.xls
    19bce.xls
    20cde.xls

    And I want to split it to something like this:

    18 abc
    18 abd
    18 ace
    19 abi
    19 bce
    20 cde

    can you help me? I know a bit of VBA but would prefer to keep it in excel.

    Thanks

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: split cells

    how exactly do they look?
    obvious thing would be =SUBSTITUTE(A1,".xls","")
    if you want a space
    =LOOKUP(10^10,--LEFT(A1,ROW($1:$99)))&" "&SUBSTITUTE(MID(A1,LEN(LOOKUP(10^10,--LEFT(A1,ROW($1:$99))))+1,255),".xls","")
    Last edited by martindwilson; 05-08-2010 at 07:57 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    05-08-2010
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: split cells

    Hey Martin

    Thanks a lot. I was not clear enough. What I want to do is the following =>

    I have a dataset like this:

    18abc.xls
    18abd.xls
    18ace.xls
    19abi.xls
    19bce.xls
    20cde.xls

    And I want to split it to something like this:

    18 (next cell) abc
    18 (next cell) abd
    18 (next cell) ace
    19 (next cell) abi
    19 (next cell) bce
    20 (next cell) cde

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: split cells

    slightly more straight forward
    b1 =
    LOOKUP(10^10,--LEFT(A1,ROW($1:$99)))
    c1 =
    SUBSTITUTE(SUBSTITUTE(A1,B1,""),".xls","")

  5. #5
    Registered User
    Join Date
    05-08-2010
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: split cells

    Hey Martin

    Sorry but I managed to solve it myself. The solution was obvious. Embarrassing :-) but text to column was sufficient.

    Anyways - thanks for you help

+ 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