Computer Hope

Software => Computer software => Topic started by: Hoplesswithexcel on June 25, 2019, 04:04:17 PM

Title: darts scores excel
Post 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
 
Title: Re: darts scores excel
Post by: Hoplesswithexcel on July 06, 2019, 09:59:26 AM
any body help me PLS :'(
Title: Re: darts scores excel
Post by: strollin on July 07, 2019, 10:31:11 AM
Would need to know more about the structure of your spreadsheet in order to help.
Title: Re: darts scores excel
Post by: patio on July 07, 2019, 02:35:24 PM
I'd hate to see the cricket scoresheet...
Title: Re: darts scores excel
Post by: Hoplesswithexcel on July 07, 2019, 03:14:10 PM
sent a screen shot dont think i can send the excel sheet?
hope this helps
cheers
Title: Re: darts scores excel
Post by: strollin on July 08, 2019, 12:18:52 PM
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?
Title: Re: darts scores excel
Post by: Hoplesswithexcel on July 08, 2019, 02:16:39 PM
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
Title: Re: darts scores excel
Post by: strollin on July 09, 2019, 10:54:52 AM
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. 

Code: [Select]
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

Title: Re: darts scores excel
Post by: Hoplesswithexcel on July 09, 2019, 07:29:44 PM
cheers strolllin
i will check it out when i git back 8) 8) 8)