+ Reply to Thread
Results 1 to 6 of 6

Perform same task to multiple worksheets that contain a text parameter

  1. #1
    Registered User
    Join Date
    02-08-2014
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    60

    Perform same task to multiple worksheets that contain a text parameter

    Hello,
    I am trying to do the following: I want to replace the values in A1:A3 with "0" and clear the contents of B1:B3 for all worksheets that contain "ILA" in the worksheet name. Is there a simple way to do this or another thread that already answers this question? I tried to search on the internet but found nothing useful. Here is a sample file (NOTE: there are no macros in this workbook even though it is saved as an .xlsm).

    Clear and replace macro on multiple tabs.xlsm

    Thanks in advance.

  2. #2
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Perform same task to multiple worksheets that contain a text parameter

    See if this helps


    Please Login or Register  to view this content.

    Thanks

  3. #3
    Registered User
    Join Date
    02-08-2014
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    60

    Re: Perform same task to multiple worksheets that contain a text parameter

    Thanks for the quick reply fredlo2010. It did not work. It deleted and replace with zero cells A4 and B4 as well. I only need to change A1:A3 to zero and B1:B3 to be cleared. The rest of the cells in the worksheet should stay the same. The macro also affected the sheet with "OLA" in the title. It should only affect worksheets whose name contains "ILA".

  4. #4
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Perform same task to multiple worksheets that contain a text parameter

    I fixed the range. Are you sure about OLA? I tested it and it works fine for me. Can you post a sample of the workbook. My code will change sheet that has a name ending in "ILA"

    Please Login or Register  to view this content.
    Thanks

  5. #5
    Registered User
    Join Date
    02-08-2014
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    60

    Re: Perform same task to multiple worksheets that contain a text parameter

    Works like a champ now. Thanks so much!!!!!!!!!!!!

  6. #6
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Perform same task to multiple worksheets that contain a text parameter

    you are welcome I am glad I was able to help. If you have to change a lot of sheets use this. The screen will not even blink.

    Please Login or Register  to view this content.
    If my answer was helpful don't forget to help my reputation

+ 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] Need Macro to perform TEXT and SUM function in multiple worksheets
    By alexxgalaxy in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-12-2013, 07:59 PM
  2. Replies: 4
    Last Post: 11-30-2012, 03:14 PM
  3. [SOLVED] search button if text box = certain text perform a task
    By randall78 in forum Excel General
    Replies: 0
    Last Post: 07-01-2012, 04:02 PM
  4. Perform a macro on multiple worksheets
    By XL2008 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-07-2011, 02:32 AM
  5. Perform same task on all worksheets in workbook
    By markrennolds in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-10-2010, 09:52 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