Can a cell remember a number?...

M

Markv

Hi all

If I generate a number in cell A1 for example, can cell B1 receive the value
and remember it when I re-generate a new number in cell A1, a new cell B2
should display the new number from A1, and B1 should still show the first
value generated from A1

Thanks for any help on this one
Hope it makes sense...
 
N

Nayab

Hi all

If I generate a number in cell A1 for example, can cell B1 receive the value
and remember it when I re-generate a new number in cell A1, a new cell B2
should display the new number from A1, and B1 should still show the first
value generated from A1

Thanks for any help on this one
Hope it makes sense...

In case u wish the values generated by some formula in A1 to be
displayed in different cells as and when the inputs to A1 changes, u
can actually record a paste value code in the next blank cell in
column B and you can run this code on change in A1
 
M

Markv

Hi thanks for the input, however I am only learning just how to work with
formulas in excell, so I would have no idea, how to set this up.
Can you help "Nayab"?

thanks mate
 
A

ARGT

I have a similar requirement. A formula in a column of cells uses a number
from an input cell. When I change the input value after already completing
some calculations in the column, all the previous values in the column change
to the new inputted value.

I understand the "Special Paste Value" approach but how do I set up the cell
to do that automatically. This seems like other problems I have in attempting
to link a macro with a cell (I can link it to a "hot button" etc but not to a
cell) .... any advice?

thanks for any input.

ARGT
 
G

Gary''s Student

Here is an example that keeps a running record of the computations in cell
A1. It is a worksheet event macro. As the value in A1 changes, each new
value is recorded in column B:

Private Sub Worksheet_Calculate()
Set a1 = Range("A1")
v = a1.Value
If IsEmpty(Range("B1").Value) Then
Range("B1").Value = a1.Value
Exit Sub
End If
n = Cells(Rows.Count, "B").End(xlUp).Row
If v = Cells(n, "B").Value Then Exit Sub
Cells(n + 1, "B").Value = v
End Sub

The macro should be installed in the worksheet code area, not a standard
module.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top