The code that I have works great as is but I was hoping to make it a little more flexible, currently when there is a "A", "B", "C" in column A when the macro runs it will send the information to sheets A Grade Rd 1 or B Grade Rd1 or sheet Gross
I was hoping to be able to add some coding so that if cell O2 on sheet Single Stroke reads STROKE and there is a C in column A then the information will be sent to a sheet named GROSS
If O2 reads 1st Round Championships and there is a A in column A then the information will be sent to A Grade Rd1 or a B in column A then the information will be sent to B Grade Rd1
I would like to do this for the other 2 rounds which will be 2nd and 3rd Round Championships and the information will be sent to the respective sheets, A Grade Rd2 B Grade Rd2 and A Grade Rd3 B Grade Rd3
Below is the code that I am using at the moment
[vba]Dim rng As Range
' Set the range as Dynamic
Set rng = Range([B13], [V65536].End(xlUp))
Dim r As Range, grade, c As Range
Dim i As Integer, sn, x As Range
grade = Array("C", "A", "B")
sn = Array("Gross", "A Grade Rd1", "B Grade Rd1")
Application.ScreenUpdating = False
For i = LBound(sn) To UBound(sn)
Sheets(sn(i)).Cells.Resize(Cells.Rows.Count - 1).Offset(1).ClearContents
Next
With Sheets("Single Stroke")
For Each r In .Range("a11", .Range("a65536").End(xlUp))
If r.Offset(0, 1).Value = "" Then GoTo SkipIt1
For i = LBound(grade) To UBound(grade)
If r.Value = grade(i) Then
Set x = Sheets(sn(i)).Range("a65536").End(xlUp).Offset(1)
x.Value = r.Offset(, 1).Value
x.Offset(, 1).Resize(, 2).Value = r.Offset(, 22).Resize(, 1).Value
x.Offset(, 2).Value = r.Offset(, 23).Value
x.Offset(, 3).Value = r.Offset(, 24).Value
x.Offset(, 4).Value = r.Offset(, 21).Value
x.Offset(, 5).Value = r.Offset(, 20).Value
x.Offset(, 6).Value = r.Offset(, 19).Value
Exit For
End If
SkipIt1:
Next
Next
End With
Application.ScreenUpdating = False
End Sub[/vba]
So what I am after is the information will be sent to the relevant sheet depending on what is in cell O2 on sheet Single Stroke.
Hope this make some sense.
Thanks for any replys