+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25

Thread: How to copy specific information from a cell with a lot of text to a separate cell.

  1. #16
    Registered User
    Join Date
    01-12-2012
    Location
    Sandefjord, Norway
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: How to copy specific information from a cell with a lot of text to a separate cel

    Ahh, thanks a lot. Works perfectly. Thanks a million!
    Just another thing: I see line 4 has the data needed in d4 instead, is it possible to add the D column to the formula as well? I could of course just change that line, but would be great, if it's possible to do the search on both columns.

    Thanks,
    Thomas.

  2. #17
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,222

    Re: How to copy specific information from a cell with a lot of text to a separate cel

    You can use IFERROR() to run a second formula if the first results in an error:

    =IFERROR(LOOKUP(2, 1/(--(ISNUMBER(SEARCH(Codes, $C4)))), Codes), LOOKUP(2, 1/(--(ISNUMBER(SEARCH(Codes, $D4)))), Codes))


    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
    _________________
    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!)

  3. #18
    Registered User
    Join Date
    01-12-2012
    Location
    Sandefjord, Norway
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: How to copy specific information from a cell with a lot of text to a separate cel

    Excellent help JB! That works great. However, solving one problem shows a new one. lol. Several of the values are similar, like 4x114 and 4x114.3. How do I make sure that the formula picks the right one? I tried adding a space at the end to 4x114 and it works in some cases, but when 4x114 is at the end of a cell, there's no space, so it's not found. Another thing, some of the cells have more than one value I'm looking for, is it best to split what you called "codes" in the excel file you edited and recreate the formula on several colums, and then point the formula to "codes1", "codes2 etc.?

    Lot's of questions from me, and I highly appreciate you taking the time to help a noob like me. Let me know if you need some help with Photoshop or designing something, I'll be happy to help you back.

    Thomas.

  4. #19
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,222

    Re: How to copy specific information from a cell with a lot of text to a separate cel

    Put the codes in the order you want them to be checked in that table. You would want the shorter codes above the "longer" versions and it will always return the longest matching code it finds. Just assemble your column H codes, then sort the table ascending, that should do it.
    _________________
    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!)

  5. #20
    Registered User
    Join Date
    01-12-2012
    Location
    Sandefjord, Norway
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: How to copy specific information from a cell with a lot of text to a separate cel

    That worked perfectly. Thanks again JB.

    In regards to the second part of my previous post: My boss told me that the rows with more than one of the codes needs to be inserted in a separate row below the existing one. (To allow for our webshop import script to work correctly) The optimal thing would be if all the data from the row is copied to the row below. Of course only for the rows that has more than one of the codes. Is this possible?

    Thomas.

  6. #21
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,222

    Re: How to copy specific information from a cell with a lot of text to a separate cel

    Quote Originally Posted by vikingim View Post
    Is this possible?
    Everything is possible. This technique is formulaic and will give you one code from the list.
    _________________
    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!)

  7. #22
    Registered User
    Join Date
    01-12-2012
    Location
    Sandefjord, Norway
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: How to copy specific information from a cell with a lot of text to a separate cel

    Hehe, yeah. The problem is how to do it. Do you know what tecnhnique I need to use to figure out this new challenge?

    Thomas.

  8. #23
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,222

    Re: How to copy specific information from a cell with a lot of text to a separate cel

    This new little addon takes your project up to a new level of complexity. Formulas cannot "insert rows", obviously, they can only display a value. So, this would require a complete specialized VBA approach.
    _________________
    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!)

  9. #24
    Registered User
    Join Date
    01-12-2012
    Location
    Sandefjord, Norway
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: How to copy specific information from a cell with a lot of text to a separate cel

    That was what I was afraid of. :P Maybe it's just easier to edit the rows with more than one option manually. Hehe.
    Thank you for all your help JB, I really appreciate it. And as I said, if you need some Photoshop or design help, just give me a shout.

    Thomas.

  10. #25
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,222

    Re: How to copy specific information from a cell with a lot of text to a separate cel

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
    _________________
    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!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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.2.0