I have a Worksheet macro that updates 2 columns (High Odds & Low Odds) for the BACK market on each selection using the Private Sub Worksheet_Change(ByVal Target As Range) macro below, and this works fine, BUT I want to record my bet trades in a record table when both bets have been fully Matched, and this is where I'm coming unstuck.
My thoughts were to run the 'Update' macro within the Worksheet Macro .......
- Code: Select all
Private Sub Worksheet_Change(ByVal Target As Range)
'****************** TRACKING BACK ODDS ************************************
'******** High BACK Odds ***********
Doing stuff to record the BACK Odds Highs & Lows
Update
End Sub
- Code: Select all
Sub Update()
Application.Goto Reference:="Data_Line"
Selection.Copy
Sheets("BF Prices").Select
Sheets("BF Prices").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlValues
'Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
' *********************** Sort *****************
Application.Goto Reference:="Event_Table_Data"
Selection.Sort Key1:=Range("Timestamp"), Order1:=xlDescending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
.... where the range 'Data_Line' is just a line of data containing Selection, Trap No., Odds, Stake, Time etc. etc. using a cell reference formulae for each requirement.
But what happens is I get a multitude of entries of the 'Data_Line' entry in my record table, and I only want 1 line. I know this probably isn't a new question and has been asked before (and probably answered by GeorgeUK/Mitch/Capatin Sensible or one of the other regulars), but what am I doing wrong?
Can't see the wood for the trees at the moment!!!