Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Write selection

Hello
If i have a button and 4 checkboxes and each refer to some numbers
1 checkbox is for 1, 2, 3 and 4
2 checkbox is for 5, 6, 7 and 8
3 checkbox is for 9, 10, 11, 12
4 checkbox is for 13, 14, 15 and 16

If i check lets say 1, 3 and 4
i like to write the numbers in cells
like this

1
2
3
4

9
10
11
12

13
14
15
16

with one empty cell between each group of number
someone pleas help
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 303
Default Write selection

First each check box needs a cell link.
to do this
right click on the check box and select <format control<control<enter
cell link address
for this example B1 B2 B3 and B4
This will cause the nominated cells to show a true or false value.

Are you ready for this????
Just copy the formula's and paste them into the worksheet.

In A11 enter
=IF(B1=TRUE,1,IF(B2=TRUE,5,IF(B3=TRUE,9,IF(B4=TRUE ,13,""))))
In A12 enter
=IF(B1=TRUE,2,IF(B2=TRUE,6,IF(B3=TRUE,10,IF(B4=TRU E,14,""))))
In A13 enter
=IF(B1=TRUE,3,IF(B2=TRUE,7,IF(B3=TRUE,11,IF(B4=TRU E,15,""))))
in A14 enter
=IF(B1=TRUE,4,IF(B2=TRUE,8,IF(B3=TRUE,12,IF(B4=TRU E,16,""))))

In A16 enter
=IF(AND(B1=TRUE,B2=TRUE),5,IF(AND(OR(B1=TRUE,B2=TR UE),B3=TRUE),9,IF(AND(OR(B1=TRUE,B2=TRUE,B3=TRUE), B4=TRUE),13,"")))
In A17 enter
=IF(AND(B1=TRUE,B2=TRUE),6,IF(AND(OR(B1=TRUE,B2=TR UE),B3=TRUE),10,IF(AND(OR(B1=TRUE,B2=TRUE,B3=TRUE) ,B4=TRUE),14,"")))
In A18 enter
=IF(AND(B1=TRUE,B2=TRUE),7,IF(AND(OR(B1=TRUE,B2=TR UE),B3=TRUE),11,IF(AND(OR(B1=TRUE,B2=TRUE,B3=TRUE) ,B4=TRUE),15,"")))
In A19 enter
=IF(AND(B1=TRUE,B2=TRUE),8,IF(AND(OR(B1=TRUE,B2=TR UE),B3=TRUE),12,IF(AND(OR(B1=TRUE,B2=TRUE,B3=TRUE) ,B4=TRUE),16,"")))

in A21 enter
=IF(AND(B1=TRUE,B2=TRUE,B3=TRUE),9,IF(AND(B1=FALSE ,B2=TRUE,B3=TRUE,B4=TRUE),13,IF(AND(B1=TRUE,B2=FAL SE,B3=TRUE,B4=TRUE),13,IF(AND(B1=TRUE,B2=TRUE,B3=F ALSE,B4=TRUE),13,"
"))))
in A22 enter
=IF(AND(B1=TRUE,B2=TRUE,B3=TRUE),10,IF(AND(B1=FALS E,B2=TRUE,B3=TRUE,B4=TRUE),14,IF(AND(B1=TRUE,B2=FA LSE,B3=TRUE,B4=TRUE),14,IF(AND(B1=TRUE,B2=TRUE,B3= FALSE,B4=TRUE),14,"
"))))
in A23 enter
=IF(AND(B1=TRUE,B2=TRUE,B3=TRUE),11,IF(AND(B1=FALS E,B2=TRUE,B3=TRUE,B4=TRUE),15,IF(AND(B1=TRUE,B2=FA LSE,B3=TRUE,B4=TRUE),15,IF(AND(B1=TRUE,B2=TRUE,B3= FALSE,B4=TRUE),15,"
"))))
in A24 enter
=IF(AND(B1=TRUE,B2=TRUE,B3=TRUE),12,IF(AND(B1=FALS E,B2=TRUE,B3=TRUE,B4=TRUE),16,IF(AND(B1=TRUE,B2=FA LSE,B3=TRUE,B4=TRUE),16,IF(AND(B1=TRUE,B2=TRUE,B3= FALSE,B4=TRUE),16,"
"))))
in A26 enter
=IF(AND(B1=TRUE,B2=TRUE,B3=TRUE,B4=TRUE),13,"")
in A27 enter
=IF(AND(B1=TRUE,B2=TRUE,B3=TRUE,B4=TRUE),14,"")
in A28 enter
=IF(AND(B1=TRUE,B2=TRUE,B3=TRUE,B4=TRUE),15,"")
in A29 enter
=IF(AND(B1=TRUE,B2=TRUE,B3=TRUE,B4=TRUE),16,"")

It took a while and there are probably a dozen other ways to
achieve the same result but it was interesting.
Have fun.

Greetings from New Zealand
Bill K


"starfighter61" wrote in message
...
Hello
If i have a button and 4 checkboxes and each refer to some numbers
1 checkbox is for 1, 2, 3 and 4
2 checkbox is for 5, 6, 7 and 8
3 checkbox is for 9, 10, 11, 12
4 checkbox is for 13, 14, 15 and 16

If i check lets say 1, 3 and 4
i like to write the numbers in cells
like this

1
2
3
4

9
10
11
12

13
14
15
16

with one empty cell between each group of number
someone pleas help




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Limiting selection in a cell AND linking that selection to a list Lisa Excel Discussion (Misc queries) 1 July 28th 09 05:00 PM
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
Identifying a selection of a selection of a range swimfast Excel Worksheet Functions 1 March 1st 07 02:51 AM
is it possible to execute write to the fields in another .xsl form a macro in another .xsl? e.g. some way to load another .xsl into an .xsl macro and write to its data? Daniel Excel Worksheet Functions 1 June 23rd 05 11:38 PM
Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue. jonH Excel Programming 3 June 7th 04 09:13 PM


All times are GMT +1. The time now is 05:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"