+ Reply to Thread
Results 1 to 8 of 8

create a vba function to split text in multiple non adjacent cells

  1. #1
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    create a vba function to split text in multiple non adjacent cells

    Hello everybody,
    I want to create a normal function or vba function to split text in multiple non adjacent cells.
    Expected vba function:
    split(e3,h3,k3,n3,q3)
    See the attachment
    Attached Files Attached Files
    Last edited by leprince2007; 12-14-2017 at 07:08 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: create a vba function to split text in multiple non adjacent cells

    Where's the code you've been working on?


    Want to get your question answered quickly?
    • Ensure your question is not too vague. Don't assume anyone is familiar with your problem. While you can upload small attachments, describe your problem in the body of the post. We are fortunate to have several Excel gurus, but few mind-readers.
    • On the other hand, skip irrelevant details. Be descriptive and concise. Short, direct, and to-the-point questions with apt thread titles are almost always answered promptly.
    • Keep the scope reasonably narrow. Questions like, "How do I set up an accounting system in Excel?" might be a long time waiting.
    • Explain what you've already tried. ("Calculation is set to automatic, but formulas still don't compute") so helpers don't waste your time or theirs.
    • Post a WORKBOOK. Nobody wants to type data from a picture or paste text from your post into a spreadsheet as a prelude to helping. To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.
    • If your question has not been answered within a day, consider adding another post with any additional information you believe is relevant. If you think your post is good as is, just reply to your own thread with the words "Bump no response", which will bring it to the top of the forum.
    Ben Van Johnson

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: create a vba function to split text in multiple non adjacent cells

    If you use this formula in E6 to E15:=

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Then this function will return your results

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 12-14-2017 at 08:43 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  4. #4
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769
    Quote Originally Posted by mehmetcik View Post
    If you use this formula in E6 to E15:=

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Then this function will return your results

    Please Login or Register  to view this content.
    Thank you for your reply,but I have some notes:
    1-I want the formula to be like this:
    Splitter(e3,h3,k3,n3,q3)
    2- If I put the formula in any other place ,it gives me error.I want to solve this error.q

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: create a vba function to split text in multiple non adjacent cells

    Simple put the correct range(s) in SPLITTER.

    =splitter($E$3:$Q$3,$E$6,3)

    Red is the input range, green start of the output range.

    Could not be much simpler.

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: create a vba function to split text in multiple non adjacent cells

    Here is a formula solution
    Enter formula in E6 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  7. #7
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769
    Quote Originally Posted by AlKey View Post
    Here is a formula solution
    Enter formula in E6 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thank you sir
    Well done

  8. #8
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: create a vba function to split text in multiple non adjacent cells

    Quote Originally Posted by AlKey View Post
    Here is a formula solution
    Enter formula in E6 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Can you explain your wonderful formula,please??
    Because I cannot understand it

+ 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. [SOLVED] How to split text & numbers in one cell to multiple cells
    By MaheshK5277 in forum Excel General
    Replies: 11
    Last Post: 02-23-2016, 07:13 AM
  2. Replies: 4
    Last Post: 11-11-2015, 03:00 PM
  3. Split text in single cells to be in multiple cells
    By mason0567 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-06-2015, 02:59 PM
  4. Split cells long text with Max 40 character to multiple row using Macro
    By chee1012 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-31-2012, 10:10 AM
  5. Combine text in multiple cells if adjacent column is blank
    By problematic in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2012, 01:52 PM
  6. split text in one cell into multiple cells without breaking the wo
    By Prashant in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-06-2006, 04:48 AM
  7. Searching for patterns in text split into adjacent cells
    By chemdude77 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-12-2006, 07:10 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