+ Reply to Thread
Results 1 to 2 of 2

Macro code to find and replace text in different worksheets based on master worksheet

  1. #1
    Registered User
    Join Date
    05-10-2017
    Location
    India
    MS-Off Ver
    2010
    Posts
    1

    Exclamation Macro code to find and replace text in different worksheets based on master worksheet

    Worksheet Name Find text Replacing Text
    Sheet2 Table A Table 1
    Sheet2 Table B Table 2
    Sheet3 Table A Table 3
    Sheet3 Table B Table 4
    Sheet4 Table A Table 5
    Sheet4 Table B Table 6

    I have a master worksheet - Sheet1 with the above data

    My requirement is I need to find the texts for e.g Table A, Table B in worksheet:Sheet2 and replace them with values Table 1 and Table 2 respectively.
    Similarly I need find the texts for e.g Table A, Table B in worksheet:Sheet3 and replace them with values Table 3 and Table 4 and so on.

    In real time, I may have 100+ worksheets similarly.

    Basically I need to find 2 old values and replace them with 2 new values in every worksheet based on the data in the master worksheet .

    Please help me out by sharing the Macro code as Iam a newbie to Excel Macros.

    I have also attached the sample excel file .Please help me out here .
    Attached Files Attached Files
    Last edited by VigneshVenkat; 05-10-2017 at 03:12 PM.

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Macro code to find and replace text in different worksheets based on master worksheet


    Use a For … Next loop - or For Each - and Replace method as explained in VBA inner help …

+ 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. Excel Macro - replace text in a worksheet based on info in another worksheet
    By Kai-Ho in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-23-2015, 04:01 AM
  2. find for a value and append the value in master sheet
    By Sindhuja in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-19-2012, 01:47 AM
  3. Replies: 7
    Last Post: 03-03-2008, 11:48 AM

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.6.0 RC 1