Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need some VBA to read a cell value, let's say on A1 on Sheet1, copy and
paste it on another spreadsheet eg: sheet2 cell A1. This may sound easy, but now, when it changes -this is everytime excel calculates, because is a dependant of a volatile function- I want the output value copied and pasted beneath the previous result on sheet2 on the cell B2, and then B3.... until B65536. I need this to analyze the outputs. Please help! Thanks in advance and greetings, Leo. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Put the following macro in the worksheet code area:
Private Sub Worksheet_Calculate() n = Sheets("Sheet2").Cells(Rows.Count, "B").End(xlUp).Row v = Sheets("Sheet1").Range("A1").Value If v < Sheets("Sheet2").Cells(n, "B").Value Then Sheets("Sheet2").Cells(n + 1, "B").Value = v End If End Sub Every time the value of A1 in Sheet1 changes because of calculation, the new value will be recorded in column B of Sheet2. This will create a "history" of the values as they change. -- Gary''s Student - gsnu200740 "Leo Rod" wrote: I need some VBA to read a cell value, let's say on A1 on Sheet1, copy and paste it on another spreadsheet eg: sheet2 cell A1. This may sound easy, but now, when it changes -this is everytime excel calculates, because is a dependant of a volatile function- I want the output value copied and pasted beneath the previous result on sheet2 on the cell B2, and then B3.... until B65536. I need this to analyze the outputs. Please help! Thanks in advance and greetings, Leo. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Student, you're the Master!!
Thanks for this code. Greetigns Leo. "Gary''s Student" wrote in message ... Put the following macro in the worksheet code area: Private Sub Worksheet_Calculate() n = Sheets("Sheet2").Cells(Rows.Count, "B").End(xlUp).Row v = Sheets("Sheet1").Range("A1").Value If v < Sheets("Sheet2").Cells(n, "B").Value Then Sheets("Sheet2").Cells(n + 1, "B").Value = v End If End Sub Every time the value of A1 in Sheet1 changes because of calculation, the new value will be recorded in column B of Sheet2. This will create a "history" of the values as they change. -- Gary''s Student - gsnu200740 "Leo Rod" wrote: I need some VBA to read a cell value, let's say on A1 on Sheet1, copy and paste it on another spreadsheet eg: sheet2 cell A1. This may sound easy, but now, when it changes -this is everytime excel calculates, because is a dependant of a volatile function- I want the output value copied and pasted beneath the previous result on sheet2 on the cell B2, and then B3.... until B65536. I need this to analyze the outputs. Please help! Thanks in advance and greetings, Leo. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
XML Data Storage | Excel Discussion (Misc queries) | |||
Data Storage | Excel Discussion (Misc queries) | |||
Variable Storage | Excel Programming | |||
newbie needs help with data storage | Excel Discussion (Misc queries) | |||
data storage from one worksheet to another | Excel Worksheet Functions |