+ Reply to Thread
Results 1 to 6 of 6

How to lock the result of a formula driven cell from the formula

  1. #1
    Registered User
    Join Date
    02-20-2020
    Location
    Kansas City, Missouri
    MS-Off Ver
    version 2016
    Posts
    11

    How to lock the result of a formula driven cell from the formula

    I have a job tracking workbook set up in Excel with a formula that when the status is changed to "Ship Date" by entering an "s" it enters the date. I am attempting to add this for "Completion Date" by entering "c" as well. I have attempted this by copying the formula for "Ship Date" and modifying it, I need to keep the value of the "Completion Date" when it moves to "Ship Date", currently it takes the value away when "Ship Date" is entered. Results that I have found so far on the web require manually copying and pasting to retain the value, I would like to find a way that does not require extra manual input as others will be using this. I would like to modify the formula if possible but am open to any answer that makes this work. Please see attached sample, thank you in advance for any help that you can offer.

    Joe M.
    Attached Files Attached Files
    Last edited by JMeehan; 08-03-2020 at 02:06 PM. Reason: Solution found

  2. #2
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: How to lock the result of a formula driven cell from the formula

    You will need VBA for this. Also, your second part of formula is doing nothing and should be removed. If(B2<>"" since is in the same cell
    Click the * to say thanks.

  3. #3
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: How to lock the result of a formula driven cell from the formula

    Something like this
    Please Login or Register  to view this content.
    it needs to be added in the worksheet module

  4. #4
    Registered User
    Join Date
    02-20-2020
    Location
    Kansas City, Missouri
    MS-Off Ver
    version 2016
    Posts
    11

    Re: How to lock the result of a formula driven cell from the formula

    Thank you for the information, I will see if I can make this work.

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: How to lock the result of a formula driven cell from the formula

    I don't know that VBA is necessary for this. The time stamp formula in column B needs a couple of extra conditions to test -- so that it can know what to do when A is "c" and what to do when a is "s".

    Something like =IF(A2="c",IF(B2<>"",B2,NOW()),IF(A2="s",IF(B2<>"",B2,""),"")) seems to work. If someone enters "c" into A2, the time stamp will be created in B2. If someone subsequently enters "s" into A2, the time stamp will be retained (and a new timestamp created in column C from that formula). If someone clears A2 or enters something other than "c" or "s", then B2 (and C2) will both be empty string.

    Edit to add: this is all assuming like every time stamp example like this, that you have enabled iteration.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Registered User
    Join Date
    02-20-2020
    Location
    Kansas City, Missouri
    MS-Off Ver
    version 2016
    Posts
    11

    Re: How to lock the result of a formula driven cell from the formula

    MrShorty,,

    This was the answer I was looking for, thank you very much to both you and PaulM100 for your time.
    I had attempted something similar earlier, I am an armature and probably didn't have it typed quite right.

    Thanks again,
    Joe M.

+ 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. [SOLVED] If formula finding text in a formula driven cell
    By UltimateNeo in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-29-2019, 11:10 PM
  2. Replies: 7
    Last Post: 11-27-2015, 11:12 AM
  3. [SOLVED] Lock Cells based on Formula result
    By NetherySC in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-26-2013, 02:47 PM
  4. lock cell formula result, even if source data changes
    By simpson in forum Excel General
    Replies: 7
    Last Post: 12-19-2011, 10:20 PM
  5. Hide Rows where cell = 0 (formula-driven)
    By nessyness in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-24-2009, 05:03 PM
  6. Advanced formula - Return result & Show Cell Reference of result
    By Irv in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-05-2006, 10:40 PM
  7. Date driven formula/worksheet
    By Corey in forum Excel General
    Replies: 10
    Last Post: 11-04-2005, 08:50 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