ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   create links to check boxes marked "good" fair"and "bad" (https://www.excelbanter.com/excel-worksheet-functions/83815-create-links-check-boxes-marked-good-fair-bad.html)

pjb

create links to check boxes marked "good" fair"and "bad"
 
How can I create a link from one worksheet to another worksheet where I have
created check boxes to define the condition, being "good" "fair" "poor" or
"bad"
I think I need to use an "IF" statement.

Max

create links to check boxes marked "good" fair"and "bad"
 
"pjb" wrote:
How can I create a link from one worksheet
to another worksheet where I have
created check boxes to define the condition,
being "good" "fair" "poor" or "bad"
I think I need to use an "IF" statement.


Yes, think you're on track with the IF statement <g

Perhaps a simple tinker to grasp how it could be set-up ?

Assume in Sheet1,
we've drawn a forms checkbox 1 for say, "good"

Right click on checkbox Format Control
In the Control tab, put for Cell link: Sheet2!$I$1 (say)
Click OK

Then in Sheet2,
we could put in say, B1: =IF(I1,"good","")

The above will return "good" in Sheet2's B1
if the checkbox 1 in Sheet1 is checked
(The cell link in Sheet2's I1 will show: TRUE)

And if it's unchecked, then Sheet2's B1 will return blank: ""
(The cell link in Sheet2's I1 will show: FALSE)

(Col I could be hidden away for neatness)

We could do likewise for the other checkboxes, viz.:
cell links in Sheet2's I2, I3, I4 ..,
and IF formulas in B2, B3, B4
reading the corresponding cell links
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---



pjb

create links to check boxes marked "good" fair"and "bad"
 
Hi, your suggestion worked great, just add another little gliche, instead of
linking it different cells for different answers, when one of the four boxes
is checked can just the correct answer show in one linked cell. Thank you
very much.

"Max" wrote:

"pjb" wrote:
How can I create a link from one worksheet
to another worksheet where I have
created check boxes to define the condition,
being "good" "fair" "poor" or "bad"
I think I need to use an "IF" statement.


Yes, think you're on track with the IF statement <g

Perhaps a simple tinker to grasp how it could be set-up ?

Assume in Sheet1,
we've drawn a forms checkbox 1 for say, "good"

Right click on checkbox Format Control
In the Control tab, put for Cell link: Sheet2!$I$1 (say)
Click OK

Then in Sheet2,
we could put in say, B1: =IF(I1,"good","")

The above will return "good" in Sheet2's B1
if the checkbox 1 in Sheet1 is checked
(The cell link in Sheet2's I1 will show: TRUE)

And if it's unchecked, then Sheet2's B1 will return blank: ""
(The cell link in Sheet2's I1 will show: FALSE)

(Col I could be hidden away for neatness)

We could do likewise for the other checkboxes, viz.:
cell links in Sheet2's I2, I3, I4 ..,
and IF formulas in B2, B3, B4
reading the corresponding cell links
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---




Max

create links to check boxes marked "good" fair"and "bad"
 
"pjb" wrote
.. instead of linking it different cells for different answers,
when one of the four boxes is checked can
just the correct answer show in one linked cell


Try using the forms option buttons instead
all housed within a forms Group Box

In Sheet1,
Draw a forms Group Box* on the sheet
(size it large enough for 4 option buttons)

*rectangle icon with the XYZ on top edge,
The group box ensures that only one option box
can be selected at any one time

Draw an option button for "good" inside the group box
Set the cell link to point to say: Sheet2!$I$1

Copy the option button paste to produce the 2nd option button for "fair".
Move and space it vertically & close below the first button within the group
box. Repeat the copy paste position for the remaining 2 buttons "poor",
then "bad"

Then in Sheet2,
we could put in say, B1:
=VLOOKUP(I1,{1,"good";2,"fair";3,"poor";4,"bad"},2 ,0)

B1 will return the option selected in Sheet1
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---




All times are GMT +1. The time now is 03:31 PM.

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