+ Reply to Thread
Results 1 to 4 of 4

Lock Cell Value once Calculated

  1. #1
    Registered User
    Join Date
    01-19-2009
    Location
    Iowa
    MS-Off Ver
    Excel 2000
    Posts
    2

    Lock Cell Value once Calculated

    I have what I believe to be a fairly unique request, since plenty of Googling hasn't turned up an answer. I designed an Excel sheet to track my budget. I enter in my paycheck amount, and from there the sheet distributes it into several different categories based on settings I enter. I have a row containing the title of each category, and under that is a row with the amount from each paycheck going to that category (either a % or a straight $$ amount). Each time I get a paycheck or make any sort of payment, I add a new row for the payment, and Excel updates the total amount available in each "account."

    My problem is that Excel updates all of my numbers live. Say I want to put $300/month into savings. A year later, I decide to put $500/month into savings. If I change the cell telling Excel how much from each paycheck should go into savings, it updates all of my payments from the last year as if I've been putting $500/month into savings the whole time. I'd like to somehow lock cells from updating after they've been calculated once, so that Excel will leave current "account" balances alone, but update with the new value from now on. Is this possible, or is there a better way to go about this?

    Thanks, the file is attached.
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    The simplest (read "low-tech) way is to periodically lock the data for previous months in the DetailSheet.

    Select the range of cells you want to "lock" and CTRL-C to copy it, then click EDIT > PASTE SPECIAL > VALUES and OK.

    The Formulas are removed and the values are now there in place of the formulas..

    For more "high tech", you could setup macros to do this, but you get the idea.
    _________________
    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!)

  3. #3
    Registered User
    Join Date
    12-30-2008
    Location
    Vermont, USA
    MS-Off Ver
    Excel 2003
    Posts
    64
    You can't really "fix" the values in the cell without a macro or doing as JBeaucaire suggested, but what might be a useful approach would be to create a lookup table that shows the start dates for changes in contributions to different accounts. Another advantage of a lookup table would be that it will provide a record for changes you've made.

    So for instance say that when you started this spreadsheet, you were contributing $300/month to Savings, 10% of total to Giving, and so on. This started Jan 1st 2005. On Aug 15 of 2007, you changed these to $425 and 12.5%, respectively. Then on Jan 5th 2009, you changed again... and so on.

    Make a lookup table somewhere like this (it may be best to put these in a separate sheet; for the example I will call the sheet DistChanges and the table will occupy the range A1:N10 (something like this):
    Please Login or Register  to view this content.
    Then in your column that keeps track of contributions to Savings, instead of having a formula that adds a $300 deposit every month, you would have the formula "look up" the date of the paycheck (from the SummarySheet), and from that determine how much should be distributed to that "account":

    So, where you're normally referencing Cell C$8 on the Details sheet, you would instead substitute the following for that portion of the formula:

    Please Login or Register  to view this content.
    You would no longer use row 8 on the Details sheet to determine distributions. The TRUE option in VLOOKUP will cause it, in this case, to find the nearest distribution change date that is <= the paycheck date. Let me know if that doesn't make sense.
    Last edited by clownfish; 01-19-2009 at 11:36 PM.

  4. #4
    Registered User
    Join Date
    01-19-2009
    Location
    Iowa
    MS-Off Ver
    Excel 2000
    Posts
    2
    That is fantastic - exactly what I needed. If anyone interested, I rewrote the whole spreadsheet to include the VLOOKUP table, and also to allow me to credit money to certain account, which wasn't possible with the old system. I combined the "credit" and "debit" columns into a credit/debit drop-down box, so if I want to move money from one account to the other it's as simple as debiting the first then crediting the second.

    Thanks a ton!

    (Note: My spreadsheet was initially too large to upload, so I removed all of the formatting and deleted a bunch of currently blank but potentially filled cells. It looks prettier in real life.)
    Attached Files Attached Files

+ 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