+ Reply to Thread
Results 1 to 7 of 7

Find specific text in A1 and replace with data from B1 using formulas

  1. #1
    Registered User
    Join Date
    12-09-2013
    Location
    BiH
    MS-Off Ver
    Excel 2010
    Posts
    12

    Find specific text in A1 and replace with data from B1 using formulas

    Hi again,

    I have hit a wall with this one, I am trying to do the following, i.e.

    Variation 1:
    A1= Big red fox has DATA apples
    B1= 4
    Formula should give me:
    C1= Big red fox has 4 apples

    Variation 2:
    A1= The fox had to jump DATA before catching the rabbit
    B1= twice
    Formula should give me:
    C1= The fox had to jump twice before catching the rabbit

    I have tried numerous formulas but none of them would do what I want, and that is to look specifically for the word "DATA" within a random amount of text in A1 and replace it with a random number of letters or a plain number (depending on the situation) from B2.

    The closest I got to making this work is using Excels default Find and Replace, but that takes me painstakingly long for larger amounts of cells and sheets
    Is there a uniform formula that can accomplish this, without me having to adjust it every time when there is more then set amount of text in A1, or a different DATA entry in B2?

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Find specific text in A1 and replace with data from B1 using formulas

    Something like this?
    Attached Files Attached Files

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,186

    Re: Find specific text in A1 and replace with data from B1 using formulas

    Maybe:
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,186

    Re: Find specific text in A1 and replace with data from B1 using formulas

    @JieJenn: apologies, no plagiarism intended. Hadn't seen your sample workbook.

    Regards, TMS

  5. #5
    Registered User
    Join Date
    12-09-2013
    Location
    BiH
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Find specific text in A1 and replace with data from B1 using formulas

    Hi,
    That was simple, thank you very much!

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,186

    Re: Find specific text in A1 and replace with data from B1 using formulas

    That was simple, thank you very much!
    Always is, when you know



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  7. #7
    Registered User
    Join Date
    12-09-2013
    Location
    BiH
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Find specific text in A1 and replace with data from B1 using formulas

    Hi, I have marked the thread as solved, thank you all once again

+ 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] Search through columns and find specific text and replace that text with header column
    By adamzee in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-09-2014, 11:59 PM
  2. Macro to find header information and replace with specific text
    By Nancy Taylor in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-15-2013, 04:47 PM
  3. Advanced find and replace specific text within a cell
    By visionwindowfilms in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-14-2011, 04:28 AM
  4. Excel 2007 : Find & Replace can't find text in formulas
    By scdearnl in forum Excel General
    Replies: 1
    Last Post: 04-07-2011, 06:51 AM
  5. Find & Replace only specific data
    By Statsman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-06-2008, 10:32 AM

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