Royalbloodi
New Member
- Joined
- Oct 31, 2023
- Messages
- 17
- Office Version
- 365
- Platform
- Windows
I don't even know how to search what I'm requesting so I started a thread. I apologize if this has been answered.
So, I have a form for accounting. I want to have check boxes for if the buyer is paying for shipping. When the check box is checked, it will do one formula and produce the profit amount in Cell S8. If it's not checked, it will do another formula and produce the profit amount in Cell S8. I would like to reduce the amount code I need because I plan on having 50 check boxes that need to be addressed.
So, the columns are:
P = Price the item was sold for
N = Quantity sold
J = Unit Cost
R = Cost of shipping
S = Profit amount
My Check Boxes are all in line Q (ActiveX)
Currently I only have this:
This handles 1 Check Box. I really don't want to do this for 50 of them...
So, I have a form for accounting. I want to have check boxes for if the buyer is paying for shipping. When the check box is checked, it will do one formula and produce the profit amount in Cell S8. If it's not checked, it will do another formula and produce the profit amount in Cell S8. I would like to reduce the amount code I need because I plan on having 50 check boxes that need to be addressed.
So, the columns are:
P = Price the item was sold for
N = Quantity sold
J = Unit Cost
R = Cost of shipping
S = Profit amount
My Check Boxes are all in line Q (ActiveX)
Currently I only have this:
VBA Code:
Private Sub CheckBox1_Click()
If CheckBox1.Value Then
'Checked
Range("S8").Formula = "=(P8*N8)-(N8*J8)"
Else
'Unchecked
Range("S8").Formula = "=(P8*N8)-(N8*J8)-R8"
End If
End Sub
This handles 1 Check Box. I really don't want to do this for 50 of them...