Super noob here and looking for a helping hand. Below is what I have written thus far and should give a rough idea of what Im trying to accomplish. I have well over 200 option buttons which work in pairs and instead of copying and pasting and switching around letters and numbers I figure there must be a way to loop through them and save myself boat loads of time.
Code:
Private Sub new1_Click()
If new1.Value = True Then Range("X11").Value = (Range("X9") / Range("X13"))
If new1.Value = True Then Range("X12").Value = (Range("X9") / Range("X57"))
End Sub
Private Sub resink1_Click()
If resink1.Value = True Then Range("x11").Value = (Range("x10") / Range("x13"))
If resink1.Value = True Then Range("x12").Value = (Range("x10") / Range("x57"))
End Sub
Private Sub new2_Click()
If new2.Value = True Then Range("y11").Value = (Range("y9") / Range("y13"))
If new2.Value = True Then Range("y12").Value = (Range("y9") / Range("y57"))
End Sub
Private Sub resink2_Click()
If resink2.Value = True Then Range("y11").Value = (Range("y10") / Range("y13"))
If resink2.Value = True Then Range("y12").Value = (Range("y10") / Range("y57"))
End Sub
Notice: The option buttons increase by 1 and Columns move to the right by 1.
Im sure there are 100 ways to skin this cat and probably a great number that are faster than what Ive got here.
Please Help!
Thanks
Code:
Private Sub new1_Click()
If new1.Value = True Then Range("X11").Value = (Range("X9") / Range("X13"))
If new1.Value = True Then Range("X12").Value = (Range("X9") / Range("X57"))
End Sub
Private Sub resink1_Click()
If resink1.Value = True Then Range("x11").Value = (Range("x10") / Range("x13"))
If resink1.Value = True Then Range("x12").Value = (Range("x10") / Range("x57"))
End Sub
Private Sub new2_Click()
If new2.Value = True Then Range("y11").Value = (Range("y9") / Range("y13"))
If new2.Value = True Then Range("y12").Value = (Range("y9") / Range("y57"))
End Sub
Private Sub resink2_Click()
If resink2.Value = True Then Range("y11").Value = (Range("y10") / Range("y13"))
If resink2.Value = True Then Range("y12").Value = (Range("y10") / Range("y57"))
End Sub
Notice: The option buttons increase by 1 and Columns move to the right by 1.
Im sure there are 100 ways to skin this cat and probably a great number that are faster than what Ive got here.
Please Help!
Thanks