+ Reply to Thread
Results 1 to 14 of 14

macro to find from one cell and replace using inputbox (multiple tabs)

  1. #1
    Registered User
    Join Date
    12-13-2012
    Location
    Kitchener, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    39

    macro to find from one cell and replace using inputbox (multiple tabs)

    Hey all,
    I have several tabs (1004, 1009, 1109, 1201, Change Week-Period)
    In the change week period tab I have:
    Cell F3: Week 1
    Cell J3: Period 8

    I would like a macro that would “find” week 1 from that tab [Change Week-Period Cell F3], and “replace” the phrase “week 1” in all tabs (1004, 1009, 1109, 1201) with whatever I type into an input box.

    Can you help me out?
    Thanks!

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: macro to find from one cell and replace using inputbox (multiple tabs)

    Can I assume that you want to replace whatever you enter in cell F3 in all the other sheets with the value you enter in an input box?

  3. #3
    Registered User
    Join Date
    12-13-2012
    Location
    Kitchener, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: macro to find from one cell and replace using inputbox (multiple tabs)

    yes, that's correct

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: macro to find from one cell and replace using inputbox (multiple tabs)

    Try this code. Change the sheet name "Master" to match the sheet name that contains your data.
    Please Login or Register  to view this content.

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: macro to find from one cell and replace using inputbox (multiple tabs)

    Hello bwaite87,

    Mumps1 gave you a neat piece of Code.

    However, if you do not have, or want to use a "Master Sheet", you could change the Code to:

    Please Login or Register  to view this content.
    Also see the "Please consider" note at the bottom of this post.
    Attached Files Attached Files
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  6. #6
    Registered User
    Join Date
    12-13-2012
    Location
    Kitchener, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: macro to find from one cell and replace using inputbox (multiple tabs)

    Hi guys,

    Thank you both for your contribution. Unfortunately I gave Mumps1 incorrect info.
    I don't want whatever is typed in cell F3 in all the other sheets with the value entered in the inputbox.

    I want the entire sheet (range A21:AX21 would suffice) in all other sheets (1004, 1009, 1109, 1201) to find only the phrase "week 1" and replace that phrase with what I enter in the inputbox.
    The purpose of this is to update the filepath in my vlookup formulas every week.

    Any additional help would be greatly appreciated.
    Thanks!

  7. #7
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: macro to find from one cell and replace using inputbox (multiple tabs)

    Hello bwaite87,

    Will this do it for you then?

  8. #8
    Registered User
    Join Date
    12-13-2012
    Location
    Kitchener, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: macro to find from one cell and replace using inputbox (multiple tabs)

    Sorry but no it didn't.
    Here's my formula (in multiple cells in all sheets)

    =IFERROR(VLOOKUP("cake fresh",'S:\RSR Settlement\RSR Settlement - WEST\Outlet-Texas\Outlet TX Weekly Recaps\2013\P8\Week 1\[1004.xlsx]WEEKLY RECAP'!$A:$C,2,FALSE),0)

    I want something that can just replace "Week 1" with, "Week 2" for example, without clearing the entire contents of the cell in the process, and without having to highlight all worksheets and "finding" and "replacing" Week 1 with Week 2. A macro makes it much simpler and my colleagues are less likely to screw it up that way

    Any other ideas?

  9. #9
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: macro to find from one cell and replace using inputbox (multiple tabs)

    Hello bwaite87,

    Mumps1 has aked you
    Can I assume that you want to replace whatever you enter in cell F3 in all the other sheets with the value you enter in an input box?
    and you replied in Post No3;

    yes, that's correct
    From that confirmation we have been giving you what your requirements appeared to have been.

    The contents of your last post is entirely different from your initial request, and since you do not seem to be exactly clear as to what you really require, I feel myself obliged to unsubscribe from this Thread.

    I help where I can, as everyone else on this Forum does, but when the "bar" gets raised with every response, without an example demostrative sample WorkBook, showing the exact requirements, I lose interest in the topic.

    Good Luck!

  10. #10
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: macro to find from one cell and replace using inputbox (multiple tabs)

    Hello bwaite87,

    Mumps1 has aked you
    Can I assume that you want to replace whatever you enter in cell F3 in all the other sheets with the value you enter in an input box?
    and you replied in Post No3;

    yes, that's correct
    From that confirmation we have been giving you what your requirements appeared to have been.

    The contents of your last post is entirely different from your initial request, and since you do not seem to be exactly clear as to what you really require, I feel myself obliged to unsubscribe from this Thread.

    I help where I can, as everyone else on this Forum does, but when the "bar" gets raised with every response, without an example demostrative sample WorkBook, showing the exact requirements, I lose interest in the topic.

    Good Luck!

  11. #11
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: macro to find from one cell and replace using inputbox (multiple tabs)

    Will this do it?
    Please Login or Register  to view this content.

  12. #12
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: macro to find from one cell and replace using inputbox (multiple tabs)

    Will this do it?
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    12-13-2012
    Location
    Kitchener, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: macro to find from one cell and replace using inputbox (multiple tabs)

    yes, thank you!

  14. #14
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: macro to find from one cell and replace using inputbox (multiple tabs)

    My pleasure.

+ 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. Macro Multiple Find and Replace with a formatted cell in Excel 2010
    By isasa74 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-31-2014, 08:01 AM
  2. Macro for Multiple Find and Replace in Excel
    By lxlth20000 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-02-2013, 07:37 AM
  3. [SOLVED] Find and Replace Macro Based on Cell Reference and Inputbox
    By bwaite87 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-07-2013, 10:46 AM
  4. Find Macro With Userform - To find a data across multiple tabs in excel
    By Testify in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-15-2012, 04:49 PM
  5. speading up a multiple Find and replace Macro
    By highwyre237 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-18-2009, 02:17 PM

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