+ Reply to Thread
Results 1 to 8 of 8

lock cell formula result, even if source data changes

  1. #1
    Forum Contributor
    Join Date
    06-27-2009
    Location
    montana,USA
    MS-Off Ver
    Excel 2007
    Posts
    190

    lock cell formula result, even if source data changes

    I have a workbook that i use daily to figure pricing to our customers. the master sheet has the date and the price, and so do the per day sheets. When i change the date and price on the master i need the price on the corrisponding sheet to lock in and not change.
    is this possible?
    example;
    on master date 1-1-11 price = 3.33
    on sheet 2 price = 3.33

    on 1-2-11 I change the master price to 3.35
    on sheet 2 the price remains 3.33
    on sheet the price shows 3.35

    thanks in advance
    Attached Files Attached Files
    Last edited by simpson; 12-07-2011 at 04:27 PM. Reason: hoping for a solution

  2. #2
    Forum Contributor
    Join Date
    12-26-2008
    Location
    India
    MS-Off Ver
    2007
    Posts
    122

    Re: lock cells on worksheets based on date

    I feel if you have macro which copies the data from master to your sheet2 when you need, should solve this prob!!

  3. #3
    Forum Contributor
    Join Date
    06-27-2009
    Location
    montana,USA
    MS-Off Ver
    Excel 2007
    Posts
    190

    Re: lock cells on worksheets based on date

    anyone else have an idea?

  4. #4
    Forum Contributor
    Join Date
    06-27-2009
    Location
    montana,USA
    MS-Off Ver
    Excel 2007
    Posts
    190

    Re: lock cells on worksheets based on date

    Would this be possible if I made the price cell lock based on data in another cell on the daily sheet? Is it even possible to lock the result of a formula in a cell even if the source data changes?

  5. #5
    Forum Contributor
    Join Date
    06-27-2009
    Location
    montana,USA
    MS-Off Ver
    Excel 2007
    Posts
    190

    Re: lock cell formula result, even if source data changes

    I edited my post. Maybe my question will be clearer.
    anyone got an idea?

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: lock cell formula result, even if source data changes

    I'd take a shot if I had any idea what this means. Your sample workbook doesn't make it any clearer.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  7. #7
    Forum Contributor
    Join Date
    12-26-2008
    Location
    India
    MS-Off Ver
    2007
    Posts
    122

    Re: lock cell formula result, even if source data changes

    Based on what I understood, I guess this should work with little tweaks, place this macro on your sheet2

    Public Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

    ActiveSheet.Unprotect Password:="mypassword"
    Sheet1.Range(Target.Address).Copy
    Sheet2.Range(Target.Address).PasteSpecial

    If Not Intersect(Target, Range(Target.Address)) Is Nothing Then
    ActiveSheet.Unprotect Password:="mypassword"
    Target.Locked = True
    ActiveSheet.Protect Password:="mypassword"
    End If

    End Sub
    Hope it helps!!

    Vinod
    Last edited by Vinodsralian; 12-20-2011 at 01:10 AM.

  8. #8
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: lock cell formula result, even if source data changes

    Vinodsralian

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

+ 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