+ Reply to Thread
Results 1 to 9 of 9

Replace Text in Multiple Tabs

  1. #1
    Registered User
    Join Date
    10-04-2011
    Location
    zurich
    MS-Off Ver
    Excel 2003
    Posts
    34

    Replace Text in Multiple Tabs

    Hi ,

    I was doing the below stuff manually till now,but the volume of files are huge around 300 files.Please tell me how can I automate the process.

    I have folder c:\SPD in this folder I have around 300.xls files, each xls file will have 4 to 5 tabs, in these tabs I need to replace the text from SERVER to CLIENT and I need to REPLACE the text V.1.2 to V.7.1.1, there is no fixed order of these words.

    Please let me know how can I do this.

    Regards,
    Swathi
    Attached Files Attached Files
    Last edited by swathidas; 01-07-2012 at 10:41 AM.

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Replace Text in Multiple Tabs

    Please Login or Register  to view this content.



  3. #3
    Registered User
    Join Date
    10-04-2011
    Location
    zurich
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Replace Text in Multiple Tabs

    Hi Snb,

    Thanks for the reply, I executed the macro but it is not replacing the text values, can you please have a look.

    Thanks for your time.

    Regards,
    Swathi

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

    Re: Replace Text in Multiple Tabs

    Same idea as snb's, just a slightly different filename method... see if this works for you:

    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 01-03-2012 at 09:20 PM. Reason: fixed the xlPART reference
    _________________
    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!)

  5. #5
    Registered User
    Join Date
    10-04-2011
    Location
    zurich
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Replace Text in Multiple Tabs

    Thanks JBeaucaire

    I executed the macro ..it is giving compilation error at the below step

    ws.Cells.Replace "SERVER", "CLIENT", LookAt:=xlValues
    Regards,
    Swathi

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

    Re: Replace Text in Multiple Tabs

    Check that post #4 again, that was corrected to LookAt:=xlPart.

  7. #7
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Replace Text in Multiple Tabs

    After analysing the code you code have made the adaptation yourself....

    Please Login or Register  to view this content.

  8. #8
    Valued Forum Contributor
    Join Date
    07-21-2008
    Location
    London, UK
    Posts
    326

    Re: Replace Text in Multiple Tabs

    I think this will depend on just how tight Your naming conventions are re Server and Client

    Client Server, FileServer, Client
    Server, Workstation, Desktop

    Etc ...... just a point

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

    Re: Replace Text in Multiple Tabs

    swathidas, if one of these takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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