Computer Hope
Software => Computer software => Topic started by: Hoplesswithexcel on June 25, 2019, 04:04:17 PM
-
Hello all love reading the forum .
hope someone can help! Please move if in wrong forum
i have made a darts scorer sheet with vlookups ,vba button which is pretty cool for someone the knows little about excel or vba its only took 9 months to get this far :-[
but my problem is i need a formula or code ? if k21 or m21 (501)reaches 0 it adds 1 to who ever reaches 0 first and reset to 501
hope someone can help .
cheers in advance
-
any body help me PLS :'(
-
Would need to know more about the structure of your spreadsheet in order to help.
-
I'd hate to see the cricket scoresheet...
-
sent a screen shot dont think i can send the excel sheet?
hope this helps
cheers
-
I know Excel but don't know anything about darts scoring. I see cells k21 and m21 on your sheet but which cell is it that has the score that 1 needs to be added to? I see 501 at the top but what do you mean by reset to 501?
-
hi strollin
wound like it to go in either i5 or o5 depending which one get to zero 1st so the person get the 1. k21 and m21 start with 501 it subtract to 0 and the cells from k5:k20 and m5:m20 clear cell
cheers
-
Here are macros that will do what you want. You need to call the macro "HitZero" after the latest score is entered into cells k21 or m21.
Sub HitZero()
If Range("k21").Value <= 0 Then ' if this player's score reaches 0
Range("i5").Value = Range("i5").Value + 1 'increment score in cell i5 by 1
Call ResetScore
ElseIf Range("m21").Value <= 0 Then ' if this player's score reaches 0
Range("o5").Value = Range("o5").Value + 1 ' increment score in cell o5 by 1
Call ResetScore
End If
End Sub
Sub ResetScore()
' Clear contents of each player's play field
Range("k5:k20").Clear
Range("m5:m20").Clear
' Reset round score to 501 for each player
Range("k21").Value = 501
Range("m21").Value = 501
End Sub
-
cheers strolllin
i will check it out when i git back 8) 8) 8)