|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have never used VBA but realise that this is what I need to resolve my problem.
Any help will be greatly appreciated. I have a file which I have attached here, which updates tennis results into a ranking list. Scores entered on the “Results” worksheet will appear in the next empty column on the “Players” worksheet, when clicking on the “Transfer Results” button. This is fine as long as they are league results. If the matches played are for a tournament however, then I need a button which would enable results to be fed into column “AG” and subsequent columns which are specifically for tournament matches (as they don’t incur penalties), and so not affect the columns for the league. I can't find any function that will do this, nor can I do it myself using the "Record Macro". Can anyone help please? many thanks in advance Billy |
|
#2
|
|||
|
|||
|
You need another column...
How do you know if the match was a tournament or a league match?
If you had another column on the Results page you could enter a T- tournament or a L-League. Then your transfer macro would consist of a loop that had an If statement. Something like this>>> Code:
Sub Transfer()
Dim r as long
For r = 1 To Range("G65535").End(xlUp).Row +1
'assuming that the T or L will be in col G.
If Range("G" & r).Value = T Then
' your code here to move to first avail after AG (let me know if you still need help)
Else
'your code here to move normally
End If
next r
End Sub
I know your post is old but let me know if I can help. Thanks, Chuck |
|
#3
|
|||
|
|||
|
Thanks for taking the time to look at this and work on it. League results and other matches such as tournaments are sent in separately. So you already know where you want to have them entered.
I have already had somebody else look at this same problem for me and it has been solved. If I knew how it has been done I would gladly tell you but visual basic is beyond me I'm afraid. Thanks again Billy B |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Can someone help by creating a macro for a novice? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|