+ Reply to Thread
Results 1 to 14 of 14

vlookup and split text data from one cell across different cells

  1. #1
    Registered User
    Join Date
    02-20-2015
    Location
    Kenya
    MS-Off Ver
    2010
    Posts
    6

    Question vlookup and split text data from one cell across different cells

    I have an excel spreadsheet that contains a lot of different text data in one cell. (these are answers to different survey questions) Now I would like to split up the answers among different cells, so that I can proceed with the analysis. I know there is a way to do this, but unfortunately my VBA skills are not sufficient.

    More concretely I would like to have:
    1) All the data that is separated by hyphon in a cell of its own.
    2) The selection of pogram features all listed in a single cells (2nd question)
    3) Ideally have the questions themselves not repeated in the cells but just the answers.

    I will have to repeat that for a set of data of 250 rows or so.

    Can anybody help me out with that? I would be very grateful! Thanks a lot.


    Current the data is presented like this in one cell:

    -Are you interested in being considered Programs in other locations and dates : Yes, please consider me for the SIM 2015
    - Which are the most important Social Innovation Management program elements and benefits to you? You can choose up to 5 progam features. : Building a global network of likeminded individuals during and after the program Gaining hands-on experience at your local apprenticeship organization Developing skills and knowledge to drive social change Gaining international experience and having the opportunity for cultural immersion Being able to change perspective and learn a different way of thinking
    - How many years of relevant work experience do you have (including internships) : 3-5 years
    - How did you first learn about this program? : Development Sector Platforms (PCDN, Africa Desk, Escape the city, etc.
    - Please tell us about your interest and/or experience in any two of your chosen areas. (max 150 words) : I chose Education and Environment/Sustainability as they go hand-in-hand. W
    - 3. What are your TWO primary areas of interest when it comes to creating social change : Education Environment/Sustainability
    - 2. Why is social change or social innovation important to you? (max 200 words) : The sense for a community is being lost and with it knowledge is being lost. A
    - 1. Tell us your story. Please note that any of the latter options should not exceed 2 mins limit : I was born in a small town....
    - What is your skype username? : 123tzub
    - Which languages do you speak? Please indicate also your fluency level in terms of native, fluent, very good, good and basic.
    : German - native English - fluent
    - What city do you live in? : Apple
    - What is your country of residence? : XXX
    - What is your nationality? : Finnish
    - What's your age? : 33
    - What is your gender? : Female

  2. #2
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: vlookup and split text data from one cell across different cells

    Hello
    You can make formulas like this
    =RIGHT(A1,LEN(A1)-FIND(":",A1)-1)
    This would extract the answer from any of your question in your data
    Hope it helps!!
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  3. #3
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: vlookup and split text data from one cell across different cells

    Glad to know it worked!!
    Cheers!!

    Thanks a ton for the reputation!!
    Happy to help

  4. #4
    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: vlookup and split text data from one cell across different cells

    Also, it should be mentioned that above formula will return the correct results ONLY if there is just one instance of ":". If there is more than one, the formula will fail. To insure that your formula only uses the last delimiter in the string use formula below

    =TRIM(RIGHT(SUBSTITUTE(A1,":",REPT(" ",LEN(A1))),LEN(A1)))
    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

  5. #5
    Registered User
    Join Date
    02-20-2015
    Location
    Kenya
    MS-Off Ver
    2010
    Posts
    6

    Re: vlookup and split text data from one cell across different cells

    Thanks for the help thus far! Any ideas on formulas which will help me to seperate the data into different cells in the first place? The text to column formula doesn't work for me, what am I doing wrong?

  6. #6
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: vlookup and split text data from one cell across different cells

    Hi
    What do you mean by in the first place?

  7. #7
    Registered User
    Join Date
    02-20-2015
    Location
    Kenya
    MS-Off Ver
    2010
    Posts
    6

    Re: vlookup and split text data from one cell across different cells

    Quote Originally Posted by sourabhg98 View Post
    Hi
    What do you mean by in the first place?

    All the above mentioned data is currently in ONE cell. More concretely I would like to have:
    1) All the data that is separated by hyphon in a cell of its own. (these are 16 different questions, so I would like to have the answer in 16 cells). Then I can proceed with the "clean up" formula that you were so kind to suggest.

    2) Also the 2nd question tends to have up to 5 diffferent answers. I would like to have them displayed in their own cells. However they don't have a delimiter thought.

    Any ideas on how to do that? Thanks so much!

  8. #8
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: vlookup and split text data from one cell across different cells

    I can find one criteria to separate ...actually the second answer has a capital after each word...let me see if I can work out a formula..

  9. #9
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: vlookup and split text data from one cell across different cells

    Give a check to the attached
    If this helps
    I have used a User desired formula for making the work easy... Hope this helps..
    Attached Files Attached Files

  10. #10
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: vlookup and split text data from one cell across different cells

    So when you say all of this is one cell, do you mean all of the questions are crammed into one cell, for instance A1? I can split this text up but the problem is things like this German - native English - fluent will cause a problem because I want to get them split at the hyphens then I can put them all in their own cell and split them again. You are going to have to figure out a way to change the questions and at least get them on separate lines or get that delimiter to something someone answering these questions won't put in an answer like ~~. Here's spreadsheet with a macro that cleans this up a bit when each question on a different line, but it doesn't address the question 2 problem.

    Edit: That : separator could be a problem also if someone types on in their answer, so having a unique separator between the question and the answer should be a priority also.

    Go to macros and run the macro, you will see the results.
    Attached Files Attached Files
    Last edited by skywriter; 02-22-2015 at 04:53 AM.
    Click the * Add Reputation button in the lower left hand corner of this post to say thanks.

    Don't forget to mark this thread SOLVED by going to the "Thread Tools" drop down list above your first post and choosing solved.

  11. #11
    Registered User
    Join Date
    02-20-2015
    Location
    Kenya
    MS-Off Ver
    2010
    Posts
    6

    Re: vlookup and split text data from one cell across different cells

    First of all thanks so much.

    I tried running it and as long as the answers are in single rows, it works beautfifully. However, since my data is all cramped into a single call (A1), it doesn't quite work as it recreates all the content 14 times. How can I automate the process of having all answers in single rows?

    Once again thanks in advance for your help!

  12. #12
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: vlookup and split text data from one cell across different cells

    Hi
    We can separate the questions but we need to have a criteria for that....like we have a "-" preceded before every question....So we can use the criteria as "-" but the problem would occur when other text would also split because of "-" like see the question below

    - Which languages do you speak? Please indicate also your fluency level in terms of native, fluent, very good, good and basic.
    : German - native English - fluent

    We see that there is a - after English... but formula wont know if it is an answer

    Another option is that if you can provide us with all the questions that would be there in the survey...so that we can use them as the criteria..
    Last edited by sourabhg98; 02-22-2015 at 01:36 PM.

  13. #13
    Registered User
    Join Date
    02-20-2015
    Location
    Kenya
    MS-Off Ver
    2010
    Posts
    6

    Re: vlookup and split text data from one cell across different cells

    Thanks a lot!

    Really helpful. How will it work though if the 5 selected answers are chosen from 11 options. Can you incorporate in the formula also the ones that weren't chosen as answers, so we report, which ones were most commonly chosen?

    Here are the 11 possible answers:
    1-*Developing skills and knowledge to drive social change 2-*Building a global network of likeminded individuals during and after the program *3- Gaining hands-on experience at your local apprenticeship organization 4- *Learning from social innovators on the ground by guest speakers and trips *5-Having a mentor during and after the program to support you in your journey *6- Gaining international experience and having the opportunity for cultural immersion *7 Discovering and developing your leadership style *8 Gaining personal inspiration 9-*Having access to networks for finding a job afterwards 10- *Being able to change perspective and learn a different way of thinking *11- Having the time for personal reflection
    Last edited by carog; 04-26-2015 at 09:01 AM.

  14. #14
    Registered User
    Join Date
    02-20-2015
    Location
    Kenya
    MS-Off Ver
    2010
    Posts
    6

    Re: vlookup and split text data from one cell across different cells

    I have one more question: can the macro be progammed as such that all the answers displayed horizontally (in rows) rather than in columns as it is right now?

+ 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. Excel VBA Split Text in Cell wit vbLF for multple Cells
    By Brawnystaff in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-06-2014, 12:43 PM
  2. Macro to split the text in the cell to different cells ( as per enclosure )
    By mvel_sky in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-01-2012, 01:23 PM
  3. split data into 2 cells, text to columns
    By ericc2728 in forum Excel General
    Replies: 7
    Last Post: 02-26-2009, 03:03 PM
  4. [SOLVED] 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
  5. [SOLVED] Split Long Text Cell into Two Shorter Cells Without Splitting Word
    By Naomi T in forum Excel General
    Replies: 1
    Last Post: 07-07-2005, 01:49 AM

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