+ Reply to Thread
Results 1 to 4 of 4

How to copy partial text from a cell into a cell in a different workbook

Hybrid View

  1. #1
    Registered User
    Join Date
    05-19-2011
    Location
    Victoria, Canada
    MS-Off Ver
    Excel 2007
    Posts
    10

    How to copy partial text from a cell into a cell in a different workbook

    Hello,

    I have a workbook (US latest month) with text in cell A1. I need to copy part of that text string to cell B3 in a different workbook (Monthly summary). Is it possible to do this using a formula in the destination cell?

    Sample original text string in A1 (no quotes): "Merchandise imports and exports between *British Columbia* and *United States*, by Harmonized System section , customs basis, February 2012"
    From this, I need to extract "February 2012 to cell B3 in the new workbook.

    Many thanks in advance!

    Erick

  2. #2
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: How to copy partial text from a cell into a cell in a different workbook

    Can I suggest you insert the formula anywhere you can on your first workbook. It will give you everything after the last coma ",":
    =TRIM(MID(A1,FIND("=",SUBSTITUTE(A1,",","=",LEN(A1)-LEN(SUBSTITUTE(A1,",",""))))+1,256))
    Then you can easily copy, and paste values into the other workbook. If you don't mind having external links you can insert the above formula in your second workbook - naturally you need to change the reference A1 for the link reference to the other workbook.
    Ron
    Knowledge is knowing that a tomato and pepper are fruits. Wisdom is knowing whether to put these in a fruit salad

    Kindly

    [1] Use code tags. Place "[code]" before the first line of code and "[/code"]" after the last line of code. Exclude quotation marks
    [2] Mark your post [SOLVED] if it has been answered satisfactorily by editing your original post in advanced mode.
    [3] Thank (using the little scale) those that provided useful help; its nice and its very well appreciated

  3. #3
    Registered User
    Join Date
    05-19-2011
    Location
    Victoria, Canada
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: How to copy partial text from a cell into a cell in a different workbook

    Excellent. Works well. Thanks Ron!

  4. #4
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: How to copy partial text from a cell into a cell in a different workbook

    Also:

    =TRIM(RIGHT(SUBSTITUTE(A1,",",REPT(" ",250)),250))
    Will extract the value after the last comma,
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

+ 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