+ Reply to Thread
Results 1 to 3 of 3

Write selection

  1. #1
    starfighter61
    Guest

    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. #2
    Tushar Mehta
    Guest

    Re: 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 <[email protected]>,
    [email protected] 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. #3
    Bill Kuunders
    Guest

    Re: 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=TRUE,14,""))))
    In A13 enter
    =IF(B1=TRUE,3,IF(B2=TRUE,7,IF(B3=TRUE,11,IF(B4=TRUE,15,""))))
    in A14 enter
    =IF(B1=TRUE,4,IF(B2=TRUE,8,IF(B3=TRUE,12,IF(B4=TRUE,16,""))))

    In A16 enter
    =IF(AND(B1=TRUE,B2=TRUE),5,IF(AND(OR(B1=TRUE,B2=TRUE),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=TRUE),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=TRUE),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=TRUE),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=FALSE,B3=TRUE,B4=TRUE),13,IF(AND(B1=TRUE,B2=TRUE,B3=FALSE,B4=TRUE),13,"
    "))))
    in A22 enter
    =IF(AND(B1=TRUE,B2=TRUE,B3=TRUE),10,IF(AND(B1=FALSE,B2=TRUE,B3=TRUE,B4=TRUE),14,IF(AND(B1=TRUE,B2=FALSE,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=FALSE,B2=TRUE,B3=TRUE,B4=TRUE),15,IF(AND(B1=TRUE,B2=FALSE,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=FALSE,B2=TRUE,B3=TRUE,B4=TRUE),16,IF(AND(B1=TRUE,B2=FALSE,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" <[email protected]> wrote in message
    news:[email protected]...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1