+ Reply to Thread
Results 1 to 2 of 2

Replacing numbers in the middle of a sentence from another column

  1. #1
    Registered User
    Join Date
    04-04-2014
    Location
    Brooklyn, NY
    MS-Off Ver
    Excel 2013
    Posts
    1

    Replacing numbers in the middle of a sentence from another column

    For example:

    In A1 It says "Silver Diamond Bracelet 3.015 Ct Cttw H-I I3 7"" and in B1 it says 2.51

    I would like to replace 3.015 which in incorrect with (the correct measurement of) 2.51

    (each line has different words leading to the number but they all have a space and "Ct" after the number)

    Thanks

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Replacing numbers in the middle of a sentence from another column

    Assuming:
    1) the text is in A1
    2) the replacement text is in B1
    3) The first period in the text is in the middle of the word to be replaced

    Put this in C1: =SUBSTITUTE(A1, TRIM(MID(SUBSTITUTE(A1," ", REPT(" ", 20)), FIND(".", SUBSTITUTE(A1," ", REPT(" ", 20)))-2, 20)), B1)
    _________________
    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)

Similar Threads

  1. Insert value from cell in middle of a sentence
    By jw191 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-22-2019, 12:53 AM
  2. [SOLVED] Copying a word from one cell in a different worksheet into the middle of a sentence.
    By DannyJ in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-25-2012, 11:18 AM
  3. How do you insert a cell's content in the middle of the sentence?
    By simpleonline1234 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-29-2010, 02:56 PM
  4. Replacing a sentence ending to a character
    By etrader in forum Excel General
    Replies: 7
    Last Post: 12-17-2009, 09:06 PM
  5. finding the middle cell in a column of numbers
    By stephen1000 in forum Excel General
    Replies: 17
    Last Post: 09-14-2009, 02:24 PM

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