+ Reply to Thread
Results 1 to 7 of 7

Find & replace info in locked hidden sheet

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    430

    Find & replace info in locked hidden sheet

    Hi Guys

    Is there a way for a user to find and replace information in a hidden locked sheet without the user having access to the sheet

    many thanks

    jim

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Find & replace info in locked hidden sheet

    Try this example
    Option Explicit
    
    Sub ReplaceText()
        Dim shtHidden As Worksheet
    
        Set shtHidden = Sheets("Hidden")
        With shtHidden
            .Unprotect
            .Range("A1:C100").Replace What:="OldText", Replacement:="NewText", LookAt:=xlPart, _
                                       SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
                                       ReplaceFormat:=False
            .Protect
        End With
    End Sub

    Adjust the range to suit your needs.

    If your hidden sheet has a password then
    .Unprotect Password:= "password"
    and
    .Protect Password:= "password"

    You could also add input boxes to define what is to be replaced and with what.
    In that case make "OldText" and "NewText" declared variables.

    Hope this helps
    Last edited by Marcol; 08-10-2011 at 03:16 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Find & replace info in locked hidden sheet

    cant see or replace ?thats generally the purpose of a hidden,locked sheet don't you think?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    430

    Re: Find & replace info in locked hidden sheet

    Hi martin

    the reason I am asking is because I'm using a workbook to collate staff information, this information is input using a 'userform'.

    the information includes things like their line manager etc.... the database will be locked and hidden, however if a manager leaves etc and we need to replace their names I would like to do so without opening up the hidden sheets

    jim

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Find & replace info in locked hidden sheet

    ah you didnt mention that!

  6. #6
    Registered User
    Join Date
    07-29-2011
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Find & replace info in locked hidden sheet

    I am looking for something very similar to this, to look at 14 hidden sheets:

    Sat (A), Sun (A), Mon (A), Tue (A), Wed (A), Thu (A), Fri (A), Sat (B), Sun (B), Mon (B), Tue (B), Wed (B), Thu (B), Fri (B)

    and replace the text "Test2" in all formulae with a declared variable.

    I need this, as I am creating a document that will reference the last 2 weeks previous month's data (pulled into weeks A and B) and will need to update the month each time a new sheet is created - weeks A and B need to be hidden to avoid confusion for the end user.

    If would be very grateful for assistance! Please let me know if you need anything further in order to help me :o)

    Jenn

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Find & replace info in locked hidden sheet

    Hello Jennasis.

    You have inadvertently broken one of the forum rules. Please read the following and make the necessary change. Thanks.

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.

+ 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