fredrerik84
Active Member
- Joined
- Feb 26, 2017
- Messages
- 383
Hi guys most of my script has been created based on Q and A here and all the help I've received is much appreciated.
I have been able to create a script that does what i want, but my code is real messy. I was hoping someone have a better solution for this code:
Best regards
frederik
I have been able to create a script that does what i want, but my code is real messy. I was hoping someone have a better solution for this code:
Code:
'Home and away teams
hteam = capsf(HTMLRows(i).Cells(IIf(i > 0, 5, 4)).innerText)
ateam = capsf(HTMLRows(i).Cells(IIf(i > 0, 9, 7)).innerText)
'Fixing under x teams and w teams
If InStr(ateam, "(") Then
If InStr(ateam, "21") = 0 Then
If InStr(ateam, "20") = 0 Then
If InStr(ateam, "(w)") = 0 Then
If InStr(ateam, "19") = 0 Then
ateam = Left(ateam, (InStr(ateam, "(")) - 2)
End If
End If
End If
End If
End If
If InStr(hteam, "(") And InStr(hteam, "21") = 0 Then
If InStr(hteam, "20") = 0 Then
If InStr(hteam, "(w)") = 0 Then
If InStr(hteam, "19") = 0 Then
hteam = Left(hteam, (InStr(hteam, "(")) - 2)
End If
End If
End If
End If
Best regards
frederik