+ Reply to Thread
Results 1 to 8 of 8

Search and Replace All in Workbook problem

  1. #1
    Forum Contributor
    Join Date
    12-12-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    448

    Search and Replace All in Workbook problem

    Hello. I am doing a search and replace in a workbook. I did it first for one tab and it worked, but when I changed the parameters to "workbook" a dialog box opens up (similar to the "save as" box) and I'm not sure what to do. Any help would be appreciated.

  2. #2
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Search and Replace All in Workbook problem

    amartino44,

    Can we see the macro code that you already have?


    If posting VBA code, please use Code Tags - like this:

    [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE]
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  3. #3
    Forum Contributor
    Join Date
    12-12-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    448

    Re: Search and Replace All in Workbook problem

    Macro code? I don't have any macro code haha. I'm just replacing a word in a formula "actual" to "actuals2". This worked for the tab I was in but not for the entire workbook.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Search and Replace All in Workbook problem

    is 'actual" and "actuals2" tab names, and if so, do they both exist? if "actuals2" is a tab reference, and that tab name does not exist, excel will open the "open file" window, expewcting you to open a file containing that tab that it cant find
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Contributor
    Join Date
    12-12-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    448

    Re: Search and Replace All in Workbook problem

    Actual is a tab name and is referenced throughout the workbook. Actual 2 is a new tab and is not referenced anywhere in the workbook. I am trying to replace Actual with Actual 2 in ALL of the tabs. It worked when I made the change in one tab but when I selected entire workbook it popped up the open file window. Thanks.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Search and Replace All in Workbook problem

    so, the tab "actuals2" does exist? and it existed before you started you're F/R effort?

    if so, is there a reason why you cant just to it tab for tab like you started, or perhaps upload a sample file

  7. #7
    Forum Contributor
    Join Date
    12-12-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    448

    Re: Search and Replace All in Workbook problem

    Hi Fdibbins. Thanks for your help. I didn't understand what you said in the second sentence. Yes, the actuals2 tab exists (I copied it in there) As I've mentioned to you before, a lot of the formulas reference the actuals tab. My first thought was to delete the actuals tab and rename actuals2 to actuals. This didn't work, as it brought up rer errors even after I renamed actuals2 to actuals (which I can do as soon as I delete the original actuals tab). Then I though, maybe I can do a search and replace for actuals to actuals2, then delete the original actuals tab or hide it. This seems like it will work but I ran into the problem I mentioned above.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Search and Replace All in Workbook problem

    the reason you got #ref errors was becuse you deleted the tab 1st, so the formulas had nowhere left to reference. is actuals2 a lot different (format/content etc) to actuals? would it be possible to jut copy act2 contents to act?

    im still not understanding why it's trying to open anotehr file when you F/R actual/actuals2. are you sure you are using exactly the same name as the tab, same spelling and everything?

+ 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