+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Replace a text (shares) with (Linked Units)

  1. #1
    Registered User
    Join Date
    05-28-2012
    Location
    South Africa, Soweto
    MS-Off Ver
    2007
    Posts
    16

    Replace a text (shares) with (Linked Units)

    Good Day

    I have a workbook with with 15 sheets, each sheet has a lot of entries my objective here is to write a macro that will run through each sheet searching for the word "Shares" in every column and replace it with " Linked Units".

    your Help is highly appreciated.

    My code Below:

    Selection.Replace What:="Shares", Replacement:="Linked Units", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
    ReplaceFormat:=False

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Replace a text (shares) with (Linked Units)

    Why not use the Find/Replace feature. To open the window use Ctrl+H.
    Find: Shares
    Replace: Linked Units
    click Replace All

  3. #3
    Registered User
    Join Date
    05-28-2012
    Location
    South Africa, Soweto
    MS-Off Ver
    2007
    Posts
    16

    Re: Replace a text (shares) with (Linked Units)

    The problem is I'll have to go tab-by-tab and perform that function which i find very time consuming since there's a lot of tab in this workbook.

    Thanx for the suggestion

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Replace a text (shares) with (Linked Units)

    The window retains the values and remains open while switching sheets. You do it for first tab, click on second tab and hit Replace All, click next tab and click Replace All, etc

    Doing this for only 15 tabs will be a lot quicker than writing the macro and implementing it.

  5. #5
    Registered User
    Join Date
    05-28-2012
    Location
    South Africa, Soweto
    MS-Off Ver
    2007
    Posts
    16

    Re: Replace a text (shares) with (Linked Units)

    Well I guess you right, I’ll stick to the find/replace function. Thanx for the assistance

    Take care

  6. #6
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Replace a text (shares) with (Linked Units)

    You're welcome. Don't forget to mark your thread as SOLVED (instructions are in rule #9 - click Forum Rules @ top of page to view).

+ 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