Hello Members and Experts,
I need to record a list of 80 bowlers their scores for analysis and hope to obtain your help.
The spredsheet contains 4 columns:
column A: Member's Number
column B: Member's Name
column C: Rank
column D: Score
Not all bowlers play exactly same number of game; some play more, some play less, so each bowler will occupy different number of rows to represent each score. Eg. the 1st bowler plays 4 games, 2nd bowler plays 6 games, and the 3rd bowler plays 3 games, and so forth. Thus column A and B, starting from Row 2 for the first bowler, always contain empty rows until the next bowler appears. I then have to copy each bowler's number (column A) and name (column B) and paste that to every single row.
With my very limited knowledge on VBA/Macro I can only create below one that can accomplish the first bowler, but without being able to repeat the process to all others.
Sub testFill()
' testFill Macro
'
Range("A2:B2").Select
Selection.Copy
Range(Selection, Selection.End(xlDown).Offset(-1, 0)).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.End(xlDown).Select
End Sub
I realize some loop process with the likes of Do...Until, Do...While, For....Next but just don't know the appropriate syntax.
Thanks very much in advance.
I need to record a list of 80 bowlers their scores for analysis and hope to obtain your help.
The spredsheet contains 4 columns:
column A: Member's Number
column B: Member's Name
column C: Rank
column D: Score
Not all bowlers play exactly same number of game; some play more, some play less, so each bowler will occupy different number of rows to represent each score. Eg. the 1st bowler plays 4 games, 2nd bowler plays 6 games, and the 3rd bowler plays 3 games, and so forth. Thus column A and B, starting from Row 2 for the first bowler, always contain empty rows until the next bowler appears. I then have to copy each bowler's number (column A) and name (column B) and paste that to every single row.
With my very limited knowledge on VBA/Macro I can only create below one that can accomplish the first bowler, but without being able to repeat the process to all others.
Sub testFill()
' testFill Macro
'
Range("A2:B2").Select
Selection.Copy
Range(Selection, Selection.End(xlDown).Offset(-1, 0)).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.End(xlDown).Select
End Sub
I realize some loop process with the likes of Do...Until, Do...While, For....Next but just don't know the appropriate syntax.
Thanks very much in advance.