So I'm feeling better about what I know, I thought. (I tip my hat to all of you that have this stuff down.)
Q: I expected that this would give me an array with holes 2 to 18, 1 in that order.
As you can tell by the question, it doesn't. In fact while the array says it has a count of 18, it only has 9 values in it. Namely r2.
Thoughts?
Code:
Sub Shotgun()
' Builds the tee box array for a shotgun start in the TeeTimes page
' Reverse Shotgun starting with hole 1 and working backwards
' Par 4's & Par 5's have two groups - Par 3's have one group
Dim r1, r2, r3, CoursePar As Range
With Sheets("Course")
Set r1 = .Range("f6:m6") 'holes 2 to 9
Set r2 = .Range("o6:w6") 'holes 10 to 18
Set r3 = .Range("e6") 'hole 1
End With
'Set up course par as 2 to 18, 1 - So the loop can go backwards
Set CoursePar = Application.Union(r1, r2, r3)
Q: I expected that this would give me an array with holes 2 to 18, 1 in that order.
As you can tell by the question, it doesn't. In fact while the array says it has a count of 18, it only has 9 values in it. Namely r2.
Thoughts?