Logging to excel, I manually select down the quickpick list, and have the worksheet_change append a list down the Excel Sheet ( i use this sheet as a guide for an overview for the entire day )
But , when say there are 15 runners in the 1450, but only 12 runners in the 1500 race ( next in quickpick list ) - then i get the last 3 runners from the 1450 race on the end of my list for the 1500 !

My code is:-
- Code: Select all
'objective : log into BA, manual select each race, export to A1 of this sheet
' as data in - ie, next race copy racename + runner names - appending from line 50 'append each race
Private Sub worksheet_Change(ByVal Target As Range)
Dim RaceDetailsToSave As Integer, EmptyRow As Integer, counter As Integer, Racewatching As String
Application.EnableEvents = False: ThisWorkbook.Worksheets.Application.Calculation = xlCalculationManual
counter = 0
Racewatching = Cells(1, 60)
If Cells(1, 1) <> Racewatching Then
Cells(1, 60) = Cells(1, 1)
'find next empty row in sheets("BA-scalp")
EmptyRow = Sheets("BA-scalp").Cells(65536, 1).End(xlUp).Row + 2
For RaceDetailsToSave = 1 To 49 Step 1
If Cells(RaceDetailsToSave, 1) <> "" Then
Cells(EmptyRow + counter, 1) = Cells(RaceDetailsToSave, 1)
counter = counter + 1
Else: Exit For
End If
Next RaceDetailsToSave
Cells(60, 9) = 0: Cells(61, 9) = 0
End If
ThisWorkbook.Worksheets.Application.Calculation = xlCalculationAutomatic: ThisWorkbook.Worksheets.Application.EnableEvents = True
End Sub
Do I need to insert a delay or somethingelse before the appending action is performed ??