+ Reply to Thread
Results 1 to 28 of 28

help in putting each value in a cell

  1. #1
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    help in putting each value in a cell

    I have attached the part of my data , I want the upper part to look like the one in the bottom

    so for example I have the following in one cell
    A1BG rs11433683 rs58916940 rs8109095 rs11669136
    rs4078160 rs4619097 rs10821846 rs61856571

    and I can't use the text to columns space separation because this will make it in two lines and I want it like the following

    A1BG rs11433683 rs58916940 rs8109095 rs11669136 rs60909809

    so they are in different cells in one line not two lines

    Thank you,
    Attached Files Attached Files
    Last edited by Marwah; 09-26-2017 at 01:52 AM.

  2. #2
    Forum Contributor
    Join Date
    11-29-2014
    Location
    India
    MS-Off Ver
    MS Excel 2007
    Posts
    240

    Re: help in putting each value in a cell

    Quote Originally Posted by Marwah View Post
    I have attached the part of my data , I want the upper part to look like the one in the bottom

    so for example I have the following in one cell
    A1BG rs11433683 rs58916940 rs8109095 rs11669136
    rs4078160 rs4619097 rs10821846 rs61856571

    and I can't use the col to text space separation because this will make it in two lines and I want it like the following

    A1BG rs11433683 rs58916940 rs8109095 rs11669136 rs60909809

    so they are in different cells in one line not two lines

    Thank you,
    I did not understand your question properly.
    Why don't you try Date->Text to Columns -> Delimited by space?

  3. #3
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: help in putting each value in a cell

    I did it didn't work, can you please apply it to the upper part of my data

  4. #4
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: help in putting each value in a cell

    since the data is in one cell looks like this
    A1BG rs11433683 rs58916940 rs8109095 rs11669136
    rs4078160 rs4619097 rs10821846 rs61856571

    how can I make it in one line rather than two each value in a cell
    to be as following
    A1BG rs11433683 rs58916940 rs8109095 rs11669136 rs4078160 rs4619097 rs10821846
    Last edited by Marwah; 09-26-2017 at 01:49 AM.

  5. #5
    Forum Contributor
    Join Date
    11-29-2014
    Location
    India
    MS-Off Ver
    MS Excel 2007
    Posts
    240

    Re: help in putting each value in a cell

    Quote Originally Posted by Marwah View Post
    I did it didn't work, can you please apply it to the upper part of my data
    sorry but I still did not understand what exactly you want to do. Check the attached file where I have used Text To Columns
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: help in putting each value in a cell

    this is wrong not what I want I want the output to be as follows
    Please Login or Register  to view this content.

  7. #7
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: help in putting each value in a cell

    hi Marwah. not sure if you have made a mistake or i don't understand the outcome. your data in the cell has 9 values. why is your outcome having only 8? it is missing the last one, "rs61856571".

    your sample excel file does not tie either. A1 is showing "A1BG rs10406132 rs1544494...."
    but row 23 is showing
    A1BG
    rs11433683
    rs58916940

    if it's a typo, then maybe:
    =TRIM(MID(SUBSTITUTE(SUBSTITUTE($A1," ",REPT(" ",LEN($A1))),CHAR(10),REPT(" ",LEN($A1))),1+(COLUMNS($B1:B1)-1)*LEN($A1),LEN($A1)))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  8. #8
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: help in putting each value in a cell

    Those are just examples not exact, I just want the upper part to look like the below one that is all

    but how to apply your code ?

  9. #9
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: help in putting each value in a cell

    maybe this?
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: help in putting each value in a cell

    Yes that is what I need plus i need a division between values in Value.1 means put them in two columns
    "A1BG" rs10406132
    "A1CF" rs12360073
    "A2M " rs11567808
    "A4GNT" rs35632604
    "AAAS" rs61915662

  11. #11
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: help in putting each value in a cell

    can you tell me how to do that ?

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: help in putting each value in a cell

    Sure, use PowerQuery (Get&Transform)

    btw, first part doesn't have space so it looks like : A1BGrs1040613

  13. #13
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: help in putting each value in a cell

    what is PowerQuery (Get&Transform) ?

  14. #14
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: help in putting each value in a cell

    there is a space , should be

  15. #15
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: help in putting each value in a cell

    Can you show me the steps please

  16. #16
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: help in putting each value in a cell

    by the way I use Macbook, so please tell me which tools that is available for mac to use to get the solution

  17. #17
    Forum Contributor
    Join Date
    11-29-2014
    Location
    India
    MS-Off Ver
    MS Excel 2007
    Posts
    240

    Re: help in putting each value in a cell

    Looks like you are getting solution. Nevertheless, I was working on your query but its not complete as i need to rush somewhere. I can give you the start...
    The following code separates words and puts them in separate columns but the code is incomplete as it takes care of only one row. May be someone can complete this. If not, I will try to complete when i get back online.
    Please Login or Register  to view this content.

  18. #18
    Forum Contributor
    Join Date
    11-29-2014
    Location
    India
    MS-Off Ver
    MS Excel 2007
    Posts
    240

    Re: help in putting each value in a cell

    Quote Originally Posted by sandy666 View Post
    Sure, use PowerQuery (Get&Transform)

    btw, first part doesn't have space so it looks like : A1BGrs1040613
    gr8!
    I remember you helped me with my query using PQ
    looks like i need to learn PQ

  19. #19
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: help in putting each value in a cell

    Thank you, could you please give me the full code and tell me how to apply it to my data

  20. #20
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: help in putting each value in a cell

    You've Ex2016, so you need to read bottom small text on the ribbon: Get&Transform, then select your data and click no. 1

    gt.jpg

    then in Query pivot column, join appropriate columns, unpivot all columns, delete unnecessary column, load to the sheet

    Maybe "here" is a space but PQ doesn't see this "first" space so you need do it manually or something like that before you add it to the query

    I don't know Mac so I can't help

    @sabha: Learn PQ ? sure
    Last edited by sandy666; 09-26-2017 at 02:44 AM.

  21. #21
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: help in putting each value in a cell

    here is with first space (you can add space before you add this to the table or after all but you will need to refresh query table)

    attached zip file with text file where code is
    txt was too big but zip is ok.
    Attached Files Attached Files
    Last edited by sandy666; 09-26-2017 at 02:42 AM.

  22. #22
    Forum Contributor
    Join Date
    11-29-2014
    Location
    India
    MS-Off Ver
    MS Excel 2007
    Posts
    240

    Re: help in putting each value in a cell

    Quote Originally Posted by Marwah View Post
    Thank you, could you please give me the full code and tell me how to apply it to my data
    Press Ctrl+F11
    In the Microsoft Visual Basic window, click on Insert->Module
    Paste the following code inside the module
    From the excel file, press Ctrl+F8 and run the code CheckEveryWordStartingWithRS

    You would get the solution from row # 25 onwards.

    Please Login or Register  to view this content.

  23. #23
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75
    Quote Originally Posted by sabha View Post
    Press Ctrl+F11
    In the Microsoft Visual Basic window, click on Insert->Module
    Paste the following code inside the module
    From the excel file, press Ctrl+F8 and run the code CheckEveryWordStartingWithRS

    You would get the solution from row # 25 onwards.

    Please Login or Register  to view this content.
    Does it work on MacBook?

  24. #24
    Forum Contributor
    Join Date
    11-29-2014
    Location
    India
    MS-Off Ver
    MS Excel 2007
    Posts
    240

    Re: help in putting each value in a cell

    Quote Originally Posted by Marwah View Post
    Does it work on MacBook?
    I am afraid I dont know. Even I am not a pro... I thought I can atleast give you start and hence wrote a broken code for you . btw, the solution suggested by @sandy666 is really cool

  25. #25
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: help in putting each value in a cell

    Quote Originally Posted by sandy666 View Post
    You've Ex2016, so you need to read bottom small text on the ribbon: Get&Transform, then select your data and click no. 1

    Attachment 539844

    then in Query pivot column, join appropriate columns, unpivot all columns, delete unnecessary column, load to the sheet

    Maybe "here" is a space but PQ doesn't see this "first" space so you need do it manually or something like that before you add it to the query

    I don't know Mac so I can't help

    @sabha: Learn PQ ? sure
    Can you tell me the exact steps I don't know how to use the power query

  26. #26
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: help in putting each value in a cell

    Don't quote whole posts -- it's just clutter. If you are responding to a post out of sequence, limit quoted content to a few relevant lines that makes clear to whom and what you are responding

    For normal conversational replies, try using the QUICK REPLY box below.

    here is a good start: PowerQuery or here
    Last edited by sandy666; 09-26-2017 at 10:08 PM.

  27. #27
    Registered User
    Join Date
    02-26-2017
    Location
    Texas
    MS-Off Ver
    MAC Excel 2016
    Posts
    75

    Re: help in putting each value in a cell

    Thanks but I really need the steps as I don't have time to look at the PowerQuery

    Thank you

  28. #28
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: help in putting each value in a cell

    Open last xlsb file
    Edit Query
    and all steps you've there

    pqsteps.jpg

    btw.
    Quote Originally Posted by Marwah View Post
    I don't have time to look at the PowerQuery
    if you don't have time why should I?

+ 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] Putting text into a cell and another cell shows monetary value
    By BeaHeyes in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-01-2017, 03:36 AM
  2. Extracting text from one cell and putting in new format in another cell
    By Beaddles in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-10-2016, 02:29 PM
  3. Find word/phrase within cell & automate putting value in adjacent cell
    By jyeg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2016, 10:44 AM
  4. Replies: 1
    Last Post: 02-14-2012, 05:45 PM
  5. Putting a different character in a cell
    By blausen in forum Excel General
    Replies: 2
    Last Post: 02-23-2006, 08:32 PM
  6. SAP BW Report - Putting the Unit of Measure or Currency in another Cell based on Format Cell
    By Frank & Pam Hayes in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-03-2005, 01:40 PM
  7. putting value in a cell instead of the formula via vba
    By neowok in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-10-2005, 09:15 AM

Tags for this Thread

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