Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have a cell that has a value that changes every second, every time this value changes I need to update values in three other cells, ie A1 to A3 by adding one to there existing values. When I try Worksheet Calculate or Change I sometimes get multiple updates instead of the single event I require. Any Ideas Thanks Alec |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What causes the value of the cell to change every second? perhaps you can
simply increment the cells from there. or perhaps try this Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$4" Then Set myrange = Range("A1:A3") For Each c In myrange c.Value = c.Value + 1 Next End If End Sub This assumes you update a second cell is A4 Mike "Alectrical" wrote: Hi I have a cell that has a value that changes every second, every time this value changes I need to update values in three other cells, ie A1 to A3 by adding one to there existing values. When I try Worksheet Calculate or Change I sometimes get multiple updates instead of the single event I require. Any Ideas Thanks Alec |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Mike
"Mike H" wrote: What causes the value of the cell to change every second? perhaps you can simply increment the cells from there. or perhaps try this Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$4" Then Set myrange = Range("A1:A3") For Each c In myrange c.Value = c.Value + 1 Next End If End Sub This assumes you update a second cell is A4 Mike "Alectrical" wrote: Hi I have a cell that has a value that changes every second, every time this value changes I need to update values in three other cells, ie A1 to A3 by adding one to there existing values. When I try Worksheet Calculate or Change I sometimes get multiple updates instead of the single event I require. Any Ideas Thanks Alec |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Alec,
I hope this helpfull: Private Sub Worksheet_Change(ByVal Target As Range) Dim rng As Range If Target.Address = "$B$1" Then For Each rng In Range("A1:A3") If IsNumeric(rng) Then rng = rng + 1 Next rng End If End Sub change "$B$1" to suit your range to fire worksheet_change -- Regards, Halim "Alectrical" wrote: Hi I have a cell that has a value that changes every second, every time this value changes I need to update values in three other cells, ie A1 to A3 by adding one to there existing values. When I try Worksheet Calculate or Change I sometimes get multiple updates instead of the single event I require. Any Ideas Thanks Alec |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Halim
"Halim" wrote: Alec, I hope this helpfull: Private Sub Worksheet_Change(ByVal Target As Range) Dim rng As Range If Target.Address = "$B$1" Then For Each rng In Range("A1:A3") If IsNumeric(rng) Then rng = rng + 1 Next rng End If End Sub change "$B$1" to suit your range to fire worksheet_change -- Regards, Halim "Alectrical" wrote: Hi I have a cell that has a value that changes every second, every time this value changes I need to update values in three other cells, ie A1 to A3 by adding one to there existing values. When I try Worksheet Calculate or Change I sometimes get multiple updates instead of the single event I require. Any Ideas Thanks Alec |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing the range for averages with out changing the formula. | Excel Worksheet Functions | |||
Changing background colour when changing data in a cell | Excel Discussion (Misc queries) | |||
Changing footers on all worksheets without changing print set up | Excel Discussion (Misc queries) | |||
Changing background color when changing value | Excel Programming | |||
Changing format of number without changing the value | Excel Discussion (Misc queries) |