I have designed a form with check boxes as well as cells that will contain numeric data. My goal is to have a cell that calculates all of the check boxes and cells to a total.
Where I'm stumped is in assigning numeric values to a check box. For example:
1. Client will click the check box next to the product to order.
2. Client may click more than one (out of 24 boxes).
3. Form will view if the box has been clicked, it will assign a dollar amount to that check box. If the box has not been selected, then value is 0.
4. Total box will add up the value of all boxes selected as well as add the numbers entered in the free form cells.
Is this possible?
And currently, I'm having trouble just making the check box understand the difference between true and false.
Oh, and I have to have this done by Friday, 10/30/09.
Thank you in advance for your help.
Given the lack of detail about the form and type of control, I assume a true VBA userform. Here is the basic idea:
If Me.CheckBox1 = True Then Range("A1").Value = 10
Palmetto
Do you know . . . ?
You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.
Thanks, I'm no longer getting any error messages, but I'm not getting any results either.
So, it seems simple to me, but what I need to do is:
1. Check boxes indicate a product to purchase.
2. Each check box has a different dollar value.
3. Each check box indicates a quantity of one.
This is where I'm stuck. In researching this more, it seems I need to take the Check Box object and link it to an empty cell to show that when the box is clicked, it becomes true, then a code will be used to read the linked cell value as true and create a dollar amount (10) in another cell that I"ll then use to add together with the other values for the total.
So, Customer orders products 1, 3 and 4.
Salesperson clicks the boxes for products 1, 3 and 4.
Product 1 = $10, Product 2 = $15, Product 3 = $25, Product 4 = $50.
System takes those and automatically calculates the cost of each for a total pre-tax cost of $85 in the subtotal field.
Make sense?
Can this be done?
Thank you so much.
It would be best if you upoaded your workbook so we don't have to guess.
If you are not using a VBA userform, but your "form" is a worksheet with check boxes then do the following:
Link the check box to a cell, say A1 for example.
In an adjacent cell, say B1, use a formula like:
=if(A1,10,0)
It will return the value ( 10 ) in the second argument if the checkbox is checked (A1 then = TRUE), or a zero if the checkbox is not checked.
Palmetto
Do you know . . . ?
You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.
Thank you so much for your prompt reply. I am not able to attach the workbook because it contains proprietary and confidential information.
However, yes, you are right. I created a worksheet and laid checkboxes on it.
Therefore, the problem now is that I don't know how to link the checkbox to a cell. My brain is fried from trying to figure this out for a day and a half. I'm sure this is the simplest part, but never having done this before, I don't know where to start.
Thanks for your help.
You can always remove sensitive data or mock up a sample that mimics the structure of the real workbook but uses dummy data.I am not able to attach the workbook because it contains proprietary and confidential information.
1. Right-click on a checkbox and choose Format Control
2. Select the Control Tab in the dialog
3. Click once in the Cell Link box
4. Either click a cell on the worksheet and type in the cell reference
5. Click OK. cell link is now established.
Palmetto
Do you know . . . ?
You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.
Thank you so much! How easy was that? Sheesh.
Thank you for your professionalism and guidance.
I guess we can consider this resolved.![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks