M
Mark Hanford
I have a simple Excel 2000 spreadsheet where each "record" consists of two
rows
R1 4.69 0.39 1.89 0.41 0.79 4.81
R2 56% 13% 6% 40% 20% 16%
R3 4.69 0.37 1.89 0.42 0.79 4.64
R4 56% 13% 6% 41% 20% 16%
R5 4.69 0.37 1.89 0.41 0.63 3.49
R6 56% 13% 6% 40% 16% 12%
And I want a row at the end that compares the last record with the one
before. Statically, this might be
=R6C1-R4C1 =R6C2-R4C2 ...
But I find that when I insert rows between the data and the summaries, they
"cleverly" keep the row id's the same.
I have created a function to calculate this:
Function CheckChanges() As Variant
CheckChanges = Cells(ActiveCell.Row - 3, ActiveCell.Column).Value -
Cells(ActiveCell.Row - 1, ActiveCell.Column).Value
End Function
However this doesn't update until I edit the field and press the enter key.
I have tried some solutions I've found on the net, like putting a "volatile"
parameter and just passing today(), but that doesn't work either.
Is a function the way to go with this? Is there another way, although even
if there's another way in this case, I'd like to know why it doesn't work
Yours stumped,
Mark
rows
R1 4.69 0.39 1.89 0.41 0.79 4.81
R2 56% 13% 6% 40% 20% 16%
R3 4.69 0.37 1.89 0.42 0.79 4.64
R4 56% 13% 6% 41% 20% 16%
R5 4.69 0.37 1.89 0.41 0.63 3.49
R6 56% 13% 6% 40% 16% 12%
And I want a row at the end that compares the last record with the one
before. Statically, this might be
=R6C1-R4C1 =R6C2-R4C2 ...
But I find that when I insert rows between the data and the summaries, they
"cleverly" keep the row id's the same.
I have created a function to calculate this:
Function CheckChanges() As Variant
CheckChanges = Cells(ActiveCell.Row - 3, ActiveCell.Column).Value -
Cells(ActiveCell.Row - 1, ActiveCell.Column).Value
End Function
However this doesn't update until I edit the field and press the enter key.
I have tried some solutions I've found on the net, like putting a "volatile"
parameter and just passing today(), but that doesn't work either.
Is a function the way to go with this? Is there another way, although even
if there's another way in this case, I'd like to know why it doesn't work
Yours stumped,
Mark