PC Review


Reply
Thread Tools Rate Thread

Changing Value

 
 
=?Utf-8?B?QWxlY3RyaWNhbA==?=
Guest
Posts: n/a
 
      17th Aug 2007
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 With Quote
 
 
 
 
=?Utf-8?B?TWlrZSBI?=
Guest
Posts: n/a
 
      17th Aug 2007
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

 
Reply With Quote
 
=?Utf-8?B?SGFsaW0=?=
Guest
Posts: n/a
 
      17th Aug 2007
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 With Quote
 
=?Utf-8?B?QWxlY3RyaWNhbA==?=
Guest
Posts: n/a
 
      17th Aug 2007
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 With Quote
 
=?Utf-8?B?QWxlY3RyaWNhbA==?=
Guest
Posts: n/a
 
      17th Aug 2007
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NumberFormat not getting changing onFly changing the regional sett Dwipayan Das Microsoft Excel Programming 1 28th May 2010 07:55 PM
Changing row height in a data grid without changing font size =?Utf-8?B?S2FzZXk=?= Microsoft C# .NET 1 30th Jun 2006 12:20 AM
How to stop entire document style changing when changing 1 line? =?Utf-8?B?VHJveSBBLiBDb3VydG5leQ==?= Microsoft Word Document Management 4 1st May 2005 11:10 PM
Keeping Calendar times from changing when changing local time zone. George Lob Microsoft Outlook Discussion 1 22nd Nov 2004 05:14 PM
Difficulty in changing the Connection Server control path changing ... Samridhi Kumar Shukla Microsoft ASP .NET 1 30th Nov 2003 02:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:54 AM.