+ Reply to Thread
Results 1 to 4 of 4

Need to keep value of a cell constant after it is derived.

  1. #1
    Registered User
    Join Date
    08-23-2012
    Location
    Butte, Idaho
    MS-Off Ver
    Excel 2010
    Posts
    2

    Need to keep value of a cell constant after it is derived.

    I have a function for cell E2, which generates a value based off of information from two other cells, D2 and I8, and a list. Once entered the information in D2 will remain constant, but I8 will change as the sheet gets used and this will cause Excel to recalculate the value for E2. Is there a way to keep the value of E2 from changing once it is calculated? I have tried using differing IF statements but generally end up with circular errors. I also found some macros that would lock the cell once used, and while some would keep the user from changing the value, Excel could still change it.

    Don't know if this will help, but here is a sample of the in E2.
    =IF(D2="Unaligned",VLOOKUP(B2,All,6,FALSE), IF(AND(D2="Khorne",$I$8=1),VLOOKUP(B2,All,4,FALSE), IF(AND(D2="Khorne",$I$8=3),VLOOKUP(B2,All,5,FALSE), IF(AND(D2="Khorne",$I$8=4),VLOOKUP(B2,All,5,FALSE), IF(AND(D2="Khorne",$I$8=2),VLOOKUP(B2,All,6,FALSE), IF(AND(D2="Khorne",$I$8=0),VLOOKUP(B2,All,6,FALSE),

    I have basic knowledge of Excel and none of VBA, so this may be sloppy.

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Need to keep value of a cell constant after it is derived.

    Once the value in E2 is satisfactory, copy the cell and PasteSpecialValues back onto itself.
    Gary's Student

  3. #3
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Need to keep value of a cell constant after it is derived.

    So basically you have

    E2 = FUNCTION(D2, I8, {lookup})

    but you want it to be

    E2 = FUNCTION(D2, old_value_of_I8, {lookup})

    The problem is, you want excel to "remember" an old value of I8, which is... not easy.

    Plus, you are going to be creating an extremely opaque function; if you have other users, they will open it up, and it will be extremely difficult for them to understand what the heck is happening. So in addition to being not easy, I think it is not wise.

    My advice is,

    E2 = FUNCTION(E8, J8, {lookup})
    J8 = user_input_from_chosen_I8

    Don't overthink this. Just change it to a reference to another cell, and make that cell a copy/paste(value) from I8, which you change manually, because it doesn't sound like there's a time when you want it to change automatically.

  4. #4
    Registered User
    Join Date
    08-23-2012
    Location
    Butte, Idaho
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Need to keep value of a cell constant after it is derived.

    Thank you for the quick responses. I was aware of the copy-paste ability, but guess I was trying to avoid it or possibly automate it.
    I8 does update automatically, as a consequence of new information being added, but that doesn't negate the idea of having the user input a returned value that wouldn't change over time.

    thank you for the help

+ 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