+ Reply to Thread
Results 1 to 4 of 4

Macro required to find text in a specified cell and replace it with text iin another cell

  1. #1
    Registered User
    Join Date
    10-21-2009
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Macro required to find text in a specified cell and replace it with text iin another cell

    Hi All


    I need a macro for Excel to do the following.


    Step 1: Look within a specified cell (i.e A1) and copy all the text in that cell (i.e it will find the text "dataSEARCH&REPLACE") which will be used as the text to search with in step 2.
    Step 2: Search within cell C1 (C1 contains various text) which will contain in one instance the text "dataSEARCH&REPLACE". The macro is to replace the text "dataSEARCH&REPLACE" with all the text stored within cell B1


    This is a simple idea, but unfortunately I have not been able to find the code already in the forums that can do this task?



    I look forward to your suggested code.


    Kind Regards
    David

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,771

    Re: Macro required to find text in a specified cell and replace it with text iin another c

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,186

    Re: Macro required to find text in a specified cell and replace it with text iin another c

    Hi, David,

    Search & Replace is available via Excel ShortCuts (CTRL+F is for Seach), you could record that action with the macro recorder to get the basic idea of what you need for code.

    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Registered User
    Join Date
    10-21-2009
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Macro required to find text in a specified cell and replace it with text in another ce

    Hello

    I need ideally a formula that can do the following;


    Example of the cell A3 tag 1FINDandREPLACE


    Step 1: Look within a specified cell (i.e cell A3) and copy the tag in that cell.
    Step 2: Search within cell B2 (B2 contains various text that includes the tags).
    The tag in cell B2 is then to be replaced with the content from cell B3.

    Step 3: Repeat steps 1 & 2 for tags A3 to A9 and MASTER HTML FILE B1 to L1 and more


    This is a simple idea, but unfortunately I have not been able to find the code already in the forums that can do this task?


    Attached is the problem in the excel file.


    I look forward to your suggested formula, or if a formula is not possible, a macro could be used and any suggestions on the macro code would be helpful.


    Kind Regards
    David

    Attachment 297391
    Attached Files Attached Files
    Last edited by Dave855; 02-20-2014 at 07:10 PM.

+ 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] Find text in cell and replace the whole cell with text
    By jed38 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-24-2013, 02:42 PM
  2. Replies: 2
    Last Post: 01-07-2013, 08:20 AM
  3. [SOLVED] Macro to copy cell contents then used Find & Replace to put text elswhere.
    By AimeeNZ in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-12-2012, 01:06 AM
  4. 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
  5. Find part of text within cell and replace from another cell
    By sydinstaller in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-27-2008, 05: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