+ Reply to Thread
Results 1 to 4 of 4

How to write a macro that searches through all of a workbook

  1. #1
    Registered User
    Join Date
    05-07-2009
    Location
    Leeds
    MS-Off Ver
    Excel 2003
    Posts
    4

    How to write a macro that searches through all of a workbook

    Hi, how do i write a macro that will find a section of text and replace it with nothing. This has to be performed in the whole of a workbook where the workbook has 250 sheets

    I have tried using the wizard (Tools > Macro > Record New Macro )to do this and selecting 'Search within Workbook' but when i re-ran the macro it only performed its find and replace in the active sheet I was when the macro was written.

    Any help would be greatly appreciated!!!

    Matt
    Last edited by mdkaye; 07-02-2009 at 07:54 AM.

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983

    Re: Help needed with simple Macro

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Registered User
    Join Date
    05-07-2009
    Location
    Leeds
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Help needed with simple Macro

    Quote Originally Posted by mudraker View Post
    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Sorry, all done now

  4. #4
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983

    Re: How to write a macro that searches through all of a workbook

    In a crude manor you will need something like this

    Please Login or Register  to view this content.
    To get a more specific answer you would need to post a copy of the code
    If posting code make sure you wrap the code as per Rule 3

+ 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