I am writing a macro to score an 11 race series with 5 different classes. I have it working with one class using:
For i = 3 To 3 + X 'this loop scores boats that raced
boatname = Sheets(ws_RaceX).Cells(i, 4) '
test = WorksheetFunction.Match(boatname, Range("D3:D13"), 0) 'this line is telling 'where in D3:D13 boat name is found
Sheets("Cumulative").Cells(test + 2, next_col).Value = i - 2
Next i
I am hoping to make this a subroutine but to do that "D3:D13" needs to be a variable. is there a way to do this?