IF statement

D

DP7

Hi I would like to know if it is possible to run an IF statement and if the
condition is FALSE. It will leave the value that was previously in the cell?
Thanks in advance
 
D

David Biddulph

No. If you put a formula in a cell, the formula will replace the previous
contents.

You can, of course, write the IF statement to include the previous contents
(whether formula or value), for example:
=IF(condition,new value,previous contents)
 
O

Otto Moehrbach

DP7
You will need VBA to do that. A formula in a cell can only return a
value and it can return a value only to the cell in which the formula
resides.
A Worksheet_Change macro can be written to look at the new contents of a
cell and then issue an Undo command if your criteria for doing so is met.
Post back if this sounds like something you could use. HTH Otto
 
Top