+ Reply to Thread
Results 1 to 9 of 9

Copying certain values from one cell (not the value from the entire cell) into other cells

  1. #1
    Registered User
    Join Date
    07-03-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    10

    Copying certain values from one cell (not the value from the entire cell) into other cells

    Hi,

    I'm having a column called "Body". Each cell in this column contains a huge amount of text. I want to select automatically certain values from that text and copy them into other cells.
    This image will explain what i mean:
    Untitled-1.jpg

    I tried to work with the function MID but that doesn't work because the values don't have a fixed position. They don't start always at the same character number.

    Does anybody has an idea to do this? You can find my file in attachment.

    Thanks in advance!

    Regards,
    Marlies
    Attached Files Attached Files

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Copying certain values from one cell (not the value from the entire cell) into other c

    See if the attached helps. I changed your coulmn headings slightly
    Attached Files Attached Files
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Copying certain values from one cell (not the value from the entire cell) into other c

    Try this in B2, Drag across to F2, then Down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Add headers as required.
    Attached Files Attached Files
    Last edited by Marcol; 07-03-2013 at 08:00 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Registered User
    Join Date
    07-03-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Copying certain values from one cell (not the value from the entire cell) into other c

    Hi Ace_XL,

    Thanks for the quick reply. The result is almost what I want.

    The column "Straat" may not contain +nr.
    The column "Postcode" may only contain the first 4 numbers.

  5. #5
    Registered User
    Join Date
    07-03-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Copying certain values from one cell (not the value from the entire cell) into other c

    Hi Marcol,

    Thanks for the quick reply!
    This is exactly what I need. But when I copy this formule in my final document (with 1000 rows), with exactly the same columns and labels, it's not working for the column "Familienaam".
    He gives #VALUE! Other columns are fine.
    Last edited by Marlies; 07-03-2013 at 09:07 AM.

  6. #6
    Registered User
    Join Date
    07-03-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Copying certain values from one cell (not the value from the entire cell) into other c

    Hi Marcol,

    I also have another file with a slightly different format. Could you do it for this file too?
    I tried to do this myself but I don't understand much from the formule .

    You would do me a great favor!

    You can download the file here.

    Many thanks...

  7. #7
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Copying certain values from one cell (not the value from the entire cell) into other c

    These problems are notoriously difficult to find a "Universal" solution for.
    In your case the principal character to split the data on is CHAR(10), carriage return.

    On that basis I would introduce a helper column substituting CHAR(10) with "|"
    this allows us to search for "|" & your required category header, this helps when we have situations like
    Bedrijfsnaam: & Naam:

    Once we have extracted all the characters after, say "|Naam:" we can replace the second instance of "|" with a string of spaces.

    Then TRIM() & Mid() will give us the desired line of information.

    We can now use SUBSTITUTE() to remove the line headers.

    See this workbook, add or change any header you need.

    In C2 drag across then down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    07-03-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Copying certain values from one cell (not the value from the entire cell) into other c

    Thank you very much for the information! My problem is solved now.

  9. #9
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Copying certain values from one cell (not the value from the entire cell) into other c

    Happy to have helped ...

+ 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