Thread: Excel Help!!
View Single Post
  #1   Spotlight this post!  
Unread 17-02-2015, 01:15
Christopher149 Christopher149 is offline
Registered User
FRC #0857 (Superior Roboworks) FTC 10723 (SnowBots)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Houghton, MI
Posts: 1,107
Christopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond repute
Re: Excel Help!!

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:
Code:
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.
Attached Files
File Type: xls Book1.xls (20.0 KB, 5 views)
__________________
2015-present: FTC 10723 mentor
2012-present: 857 mentor
2008-2011: 857 student

2015: Industrial Design, Excellence in Engineering, District Finalist, Archimedes Division (#6 alliance captain)
2014: Judges Award, District Engineering Inspiration, District Finalist, Galileo Division

Reply With Quote