+ Reply to Thread
Results 1 to 12 of 12

Split one cell data into different cells

  1. #1
    Registered User
    Join Date
    07-06-2009
    Location
    Delhi
    MS-Off Ver
    Excel 2003
    Posts
    5

    Split one cell data into different cells

    Hi,
    Please provide me macro of the attached sheet.
    Actaully i want a macro which are splits one cell data into deiffernt cells or rows.
    Please do the as soon as posible.

    Thanks & Rgds
    Firoz
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    02-19-2005
    Location
    Gurgaon,India
    MS-Off Ver
    2007,2010,2013
    Posts
    180

    Re: Split one cell data into different cells

    Hi Firoz,

    Welcome to board!!

    Try this macro.

    Note: create a backup of your file first.

    Please Login or Register  to view this content.
    HTH
    Kris

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Split one cell data into different cells

    Here's a set of formulas that will do the work. Just point the first set (rows 15) at your starting cell of data, then copy down, all your values will appear.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    07-06-2009
    Location
    Delhi
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Split one cell data into different cells

    Thanks So much. i am appriciate your help. But if you give me macro then it'll be better for me. but still its very good. thanks agian

  5. #5
    Registered User
    Join Date
    07-06-2009
    Location
    Delhi
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Split one cell data into different cells

    Thanks so much. i am appriciating your help.

  6. #6
    Registered User
    Join Date
    07-06-2009
    Location
    Delhi
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Split one cell data into different cells

    hi Krishnakumar,
    First of all thanks for your greate help...
    But macro us not workinf... when i am run the macro got the error.
    then i debug the code then its give below attached code in yellow..

    .TextToColumns Destination:=r.Cells(1, 1), DataType:=xlDelimited, _
    TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=True, _
    Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
    :="-", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 3), Array(4, 3), Array(5, _
    1), Array(6, 1), Array(7, 1)), TrailingMinusNumbers:=True

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Split one cell data into different cells

    Here's my original solution in a macro form. Your data has some really odd random characters in and amongst the spaces making Krishna's macro behave irregularly.

    Mine uses the characters within the strings to parse and seems to behave more consistently.

    Put your data in the DATA sheet in column A and run the macro, it will create the REPORT sheet for you.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    07-06-2009
    Location
    Delhi
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Split one cell data into different cells

    Thanks so much...
    Man you are a Rocket science,

  9. #9
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Split one cell data into different cells

    If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].


    (Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated)

  10. #10
    Forum Contributor
    Join Date
    02-19-2005
    Location
    Gurgaon,India
    MS-Off Ver
    2007,2010,2013
    Posts
    180

    Re: Split one cell data into different cells

    Hi,

    Select B4:B8 and run the code.

    Please Login or Register  to view this content.
    HTH
    Last edited by Krishnakumar; 07-11-2009 at 07:16 AM.

  11. #11
    Registered User
    Join Date
    03-31-2013
    Location
    rvireon near
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Split one cell data into different cells

    Hi,

    Having the same problem. But the find fucntion should not be hardcoded. It should be taken from a different sheet and paste the date.

    text file is imported and placed in a excel sheet.

    1.if the first 4 characters are matching with the work sheet name then it should copy the entire row and paste the columns wise data based on column split up. The split for each column will be given in separate sheet.

    1XYZ Column1 1 10
    1XYZ Column2 11 18
    1XYZ Column3 29 18
    1XYZ Column4 47 10
    1XYZ Column5 57 12



    2.If there are any unmatched rows then it should be pasted in Unmatched row.

  12. #12
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Split one cell data into different cells

    David4red,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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