Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Write selection
What have you tried so far? Where are you stuck?
-- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article , says... 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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Limiting selection in a cell AND linking that selection to a list | Excel Discussion (Misc queries) | |||
Copy Selection - Transpose Selection - Delete Selection | Excel Discussion (Misc queries) | |||
Identifying a selection of a selection of a range | Excel Worksheet Functions | |||
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? | Excel Worksheet Functions | |||
Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue. | Excel Programming |