|It is not clear what you are trying to do. |
Are you entering your values (e.g. 1 and 2) in the same cell and expecting Excel to remember what was in that cell before the change? If so, that can not be done with a formula and is even difficult to do with a macro. Excel can't "remember" past values, they have to exist someplace in order for Excel to perform a calculation on them.
You say you "know IF() formula)". Perhaps you could explain how you are using IF to accomplish your goal and we'll see if we can suggest something "easier".
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.