Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It looks like you want to trace the values that get put into B14. try this
code. the worksheet change function need to be placed in the Sheet code, not a module. Sub worksheet_change(ByVal target As Range) If (target.Row = 14) And _ (target.Column = 2) Then 'get last value in column c LastRow = Cells(Rows.Count, "C").End(xlUp).Row oldvalue = Cells(LastRow, "C") If (LastRow = 1) And IsEmpty(oldvalue) Then Cells(1, "C") = target Else If target < oldvalue Then Cells(LastRow + 1, "C") = target End If End If End If End Sub "Robert" wrote: Situation: Cells 14,B holds my variable. This changes over time (by the vb code). Is there some way that, when the data changes it will be written in a new cell. Something like this. If Range("B14") < Range("B14") Then old new copy it into cell C1. then C2, then C3 etc etc And then loop this until no more changes. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
select data and write results to new worksheet in same workbook | Excel Discussion (Misc queries) | |||
Array write | Excel Programming | |||
Transfer data from worksheet to array | Excel Programming | |||
Array to read data from one sheet and write to another if it meets criteria | Excel Programming | |||
Formula to fill inthe Quarter | New Users to Excel |