Excel Help

Discuss anything related to using the program (eg. triggered betting tactics)

Moderator: 2020vision

Excel Help

Postby U.F.O » Fri Jan 06, 2012 8:18 pm

I would like to record the value of the cell A1 everytime it changes,
i have the folowing so far but it does not work from a formular.


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$A$1" Then Exit Sub
Range("B65536").End(xlUp).Offset(1, 0).Value = Target
End Sub

any ideas thanks :)
U.F.O
 
Posts: 228
Joined: Tue May 19, 2009 3:21 pm

Postby osknows » Fri Jan 06, 2012 10:18 pm

Hello,

How about this...

Code: Select all
Option Explicit

Dim CellA1 As String

Private Sub Worksheet_Change(ByVal Target As Range)
If CellA1 <> Target.Cells(1, 1).Value Then
    CellA1 = Target.Cells(1, 1).Value
    Range("B65536").End(xlUp).Offset(1, 0).Value = CellA1
End If
End Sub
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby U.F.O » Sat Jan 07, 2012 12:43 pm

Thanks thats nearly what i need but
it still only works if you manually type a number to cell A1

want i need is to be able to have it work when A1 is the sum of another cell
if that makes sense.

might just be that im doing something wrong :?
U.F.O
 
Posts: 228
Joined: Tue May 19, 2009 3:21 pm

Postby U.F.O » Sat Jan 07, 2012 12:46 pm

If it helps, what i am trying to do
is record varius data, matched amounts, odds ect
everytime they change so i can make graphs and things out of the data .
U.F.O
 
Posts: 228
Joined: Tue May 19, 2009 3:21 pm

Postby osknows » Sat Jan 07, 2012 1:33 pm

Ah I understand now..

Try this

Code: Select all
Option Explicit

Dim CellA1 As String

Private Sub Worksheet_Calculate()
If CellA1 <> Cells(1, 1).Value Then
    CellA1 = Cells(1, 1).Value
    Range("B65536").End(xlUp).Offset(1, 0).Value = CellA1
End If
End Sub
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby U.F.O » Sat Jan 07, 2012 1:42 pm

Yes that works great thanks :D
U.F.O
 
Posts: 228
Joined: Tue May 19, 2009 3:21 pm

Postby U.F.O » Sat Jan 07, 2012 2:22 pm

Ok so another problem ,what i need to do now is
record some other cells values at the same time,

so say i had data in cells a1,a2,a3,a4,a5
i would like that copied into colums b, c, d, e, & f ,
everytime the Cell A1 value had changed.


thought i would have been able to do it myself but it appears not :oops:
thanks
U.F.O
 
Posts: 228
Joined: Tue May 19, 2009 3:21 pm

Postby osknows » Sat Jan 07, 2012 3:45 pm

Try this...

Code: Select all
Option Explicit

Dim CellA1 As String

Private Sub Worksheet_Calculate()
Dim varArray() As Variant
If CellA1 <> Cells(1, 1).Value Then
    CellA1 = Cells(1, 1).Value
    varArray = WorksheetFunction.Transpose(Range("A1:A5").Value)
    Range("B65536").End(xlUp).Offset(1, 0).Resize(1, 5).Value = varArray
End If
End Sub
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby U.F.O » Sat Jan 07, 2012 3:51 pm

thats exactly what i was looking for thanks a lot :D

would have taken me weeks to work out without help :lol:
U.F.O
 
Posts: 228
Joined: Tue May 19, 2009 3:21 pm


Return to Discussion

Who is online

Users browsing this forum: No registered users and 34 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.