# How do I leave value unchanged

This is a discussion on How do I leave value unchanged within the Excel Questions forums, part of the Question Forums category; How would I have excel leave a value unchanged if it does not meet the parameters of the formula. Ex. ...

1. ## How do I leave value unchanged

How would I have excel leave a value unchanged if it does not meet the parameters of the formula.

Ex.

=IF(B15 < C15,"6/11/03",IF(B15 > C15,"6/18/03",""))

This formula would print 6/18/03 for all values in cell B15 that are greater than the value of
C15.
And it would also print 6/11/03 for any that was less than the value of C15

My problem is that if the value in B15 is the same as the value in C15 the cell goes blank and I want it to keep the previous value (stay unchanged).

Please let me know if there is a way to have the value stay the same if there is no change between B15 and C15.

2. ## Re: How do I leave value unchanged

Do you mean this?

=IF(B15<=C15,"6/11/03","6/18/03")

3. Originally Posted by jmiskey
Do you mean this?

=IF(B15<=C15,"6/11/03","6/18/03")
Thank you for the reply jminskey.

What I am having issues with is that if the value in b15 and c15 are the same(No Change) excel changes the value to the second date "6/11/03" or makes it blank (depending on the formula used). I would like for the cell to keep its value ( Do nothing ) if b15 and c15 are =.

I hope this clarifies the question.

4. ## Re: How do I leave value unchanged

If understand what you are asking, I afraid what you are asking is impossible without VBA.

Excel has no memory of what was in cells before. If you have a value in a cell, then you enter a formula in that cell, the value that was there before ceases to be and is replaced by your formula.

The only way to accomplish something like that is with VBA, where the calculations are done behind the scene and not in the cell itself.

5. ## Re: How do I leave value unchanged

I'm not sure you can do that, a worksheet function always returns a value, which would overwrite what's in the cell. The only way I can think of would be via VBA and the worksheet change event, or possibly the RECALL function from MoreFunc, although I think you would need another column for this.

6. ## Re: How do I leave value unchanged

Actually, I think you can do this, without VBA...

First, in Tools | Options, Calculate, CHECK the "Iterate" box, and put "1" in the number of iterations.

=IF(B15 < C15,"6/11/03",IF(B15 > C15,"6/18/03",D15))

this is when a circular reference comes handy...

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•