I was wondering if anybody could help me with some excel work. I am trying to make a spread sheet for scouting and have everything done except one part. I have a sheet where I can change the matches, on this sheet there are three cells that I want to change to a default number of 0 when I change the match number. Any help would be nice, Thank you!
After looking at a couple StackOverflow posts 1] and 2], I think some Visual Basic might be easiest.
I’ve attached an .xls which does the job (created from Excel 2003). The code is set to change cell B2, C2, and D2 to “0” whenever cell A2 is edited. The code is as follows:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Target.Worksheet.Range("A2")) Is Nothing Then
Target.Worksheet.Range("B2").Value = 0
Target.Worksheet.Range("C2").Value = 0
Target.Worksheet.Range("D2").Value = 0
End If
End Sub
In the event this doesn’t work in you version of Excel, let me know. I have no good idea if this is “clean” VBA code, but it works. Go and change the cells as appropriate.
PS: you’ll probably have to enable macros upon opening the file.
Book1.xls (20 KB)
Book1.xls (20 KB)