Macro - text box - conditions

E

ekonomija

Dear,

I have the following issue, so please if someone could help in this one:

Workbook contains differenet dialog boxes with different grades, like
questionaire:

Cell A1: 5
Cell B1: 4
Cell C1: 3
Cell D1: 2
Cell E1: 1

Cells A2:E7 have different check boxes with different text values

How to create a macro:

1. That contains condition: that if check box is filled in the cell
A1, that can't be checked in the other cells in the row, but it is ok for the
other in column.
2. To calculate avarage in the cell E8 of those check boxes: ie. If
from A1:A7 all boxes checked, then avarage is 5,00

p.s. – is it possible to change font type in check boxes? And how?


Thank you very much!

Kindly,
ekonomija
 
J

joel

You can't use a check box. The normal method is to use a radio button
on the form toolbar. Then add a group box around the buttons where only
one button can be selected at a time.
 
J

joel

the worksheet menu

View - Toolbars - forms


Put the round button on to the worksheet. Add a number of thes
buttons then surround them with the group box. You will only be able t
select one button at a time
 
E

ekonomija

Thanks a lot!

But, this solved only part of my problem.

How to calculate those things, like I mentioned in my first post?

Thank you very much for help!
 
D

Dave Peterson

You can use a linked cell and optionbuttons from the Forms toolbar.

If you're doing a survey, take a look at Debra Dalgleish's site.
http://contextures.com/xlForm01.html

Even if you're not building a survey, you can save the sample workbook and see
how you could average the linked cells (in column C):

=average(C:C)
or
=average(C2:c11)
 
J

joel

form objects and Oleobjects have a lijnked cell property that put th
results of the object into a cell in the worksheet. for the buttons i
will insert a True or false onto the worksheet if selected or no
selected. You have to put a linked cell intot he worksheet for eac
button and then use a formula that uses the True or False to get th
average

lined to A B and C
A B C D E F
1 2 3 True False False
4 5 6 True False False
7 8 9 False True False


=(Sumproduct(--(D1:D3=True),A1:A3)
Sumproduct(--(E1:E3=True),B1:B3)+Sumproduct(--(F1:F3=True),C1:C3))/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top