ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro - text box - conditions (https://www.excelbanter.com/excel-programming/435620-macro-text-box-conditions.html)

ekonomija

Macro - text box - conditions
 
Dear,

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

Workbook contains differenet dialog boxes with different grades, like
questionai

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

joel[_141_]

Macro - text box - conditions
 

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.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=149531


ekonomija

Macro - text box - conditions
 
Radio button?

"joel" wrote:


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.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=149531

.


joel[_142_]

Macro - text box - conditions
 

the worksheet menu

View - Toolbars - forms


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


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=149531


Dave Peterson

Macro - text box - conditions
 
also known as OptionButtons.

ekonomija wrote:

Radio button?

"joel" wrote:


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.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=149531

.


--

Dave Peterson

ekonomija

Macro - text box - conditions
 
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!

"Dave Peterson" wrote:

also known as OptionButtons.

ekonomija wrote:

Radio button?

"joel" wrote:


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.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=149531

.


--

Dave Peterson
.


Dave Peterson

Macro - text box - conditions
 
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)



ekonomija wrote:

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!

"Dave Peterson" wrote:

also known as OptionButtons.

ekonomija wrote:

Radio button?

"joel" wrote:


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.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=149531

.


--

Dave Peterson
.


--

Dave Peterson

joel[_166_]

Macro - text box - conditions
 

form objects and Oleobjects have a lijnked cell property that put the
results of the object into a cell in the worksheet. for the buttons it
will insert a True or false onto the worksheet if selected or not
selected. You have to put a linked cell intot he worksheet for each
button and then use a formula that uses the True or False to get the
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))/3


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=149531

Microsoft Office Help



All times are GMT +1. The time now is 01:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com