Record a Cell's Prior Value: Can It Be Done?

Frith

Board Regular
Joined
Nov 1, 2009
Messages
99
Greetings,


Could it be possible to "sequentially offset" a vlaue, say, of A1 such that, for instance, when A1 changes from "5" to "6" (via formula, not direct input), A1=6 and, say, B1=5, and so on? You know, like keeping a value record of A1, one step back, in B1.

This would be UNBELIEVABLY valuble to me. Thus, would I be in eternal debt to he/she who would resolve this here.


Thank you,
I am Frith of Whales and I have a case of the Mondays.
 
I have a similar problem that the above doesnt seem to answer.

I have a cell (C2) that is auto updated with total sales for today. I want to detect when there is a "batch" of sales >= 10. ie. C2 may start at zero for the day and increment by 1,2,5 or 10 units at a time. If the increment is 10 units or more I would like to detect this.

Typical values in C2: 0, 1, 6, 7, 9, 19, 21, 22 etc

The large order between 9-19 (viz 10 or more), I need to detect.

Can you help solve this one? Many thanks for any help
 
Upvote 0

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi,
Code:
If Range("I3") <> Temp Or Range("I3") = Temp Then Range("I1") = Temp
This line is saying if "I3" is any othe value than "Temp" or is Equal to temp Then "I1" = Temp, That is saying whatever "I3" is, then "I1" = temp.
Or Am I misunderstanding this !!
Regards Mick
 
Upvote 0
Hi there,

No worries, Big M. I went with a "mega-formula" I had been too lazy to employ. Though, I was still able to use that code for a secondary issue I had.

It was just that, when I input, say, "3" into I3, then, say, "33" into I3, "3" would therefore obtain in I1 (perfect so far)... However, when I ONCE MORE input "33" into I3, this value did not obtain in I1 (as a prior value), since 33 is "=" 33, not "<>" 33. Or so I imagined this to be the issue, as all other values worked just fine.

Thanx again for all the help,
Frith
 
Upvote 0
Almost forgot...

Code:
Dim Temp, Temp2, Temp3, Temp4
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Last As Integer
Application.EnableEvents = False
If Range("I3") <> Temp Then Range("I1") = Temp
If Range("I3") = Temp Then Range("I1") = Temp
If Range("I4") <> Temp2 Then Range("I2") = Temp2
If Range("I4") = Temp2 Then Range("I2") = Temp2
If Range("J3") <> Temp3 Then Range("J1") = Temp3
If Range("J3") = Temp3 Then Range("J1") = Temp3
If Range("J4") <> Temp4 Then Range("J2") = Temp4
If Range("J4") = Temp4 Then Range("J2") = Temp4
Application.EnableEvents = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Temp = [i3]
Temp2 = [i4]
Temp3 = [j3]
Temp4 = [j4]
End Sub</pre>
I guess that's what I was getting at...

Thanx again...
 
Upvote 0

Forum statistics

Threads
1,223,237
Messages
6,170,924
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top