+ Reply to Thread
Results 1 to 7 of 7

Choosing between two alternatives with a checkbox

  1. #1
    Registered User
    Join Date
    08-10-2012
    Location
    Umeå, Sweden
    MS-Off Ver
    Excel 2011
    Posts
    4

    Choosing between two alternatives with a checkbox

    Hi all, my first post here but i've already found lots of help reading other threads. I have not found an answer to my new problem, though.

    Basically, i want to make a lots of calculation which depend on the previous results and for one column i want to choose between a constant value or a function, depending on whether a checkbox has been "checked" or not. I've been trying a lot, using a if else function but it always chooses the constant value, as it is written now. It should also be mentioned that the checkbox is on another sheet than the calculations.

    I'm very new to VB, but i appreciate all kind of help! i'm using Excel 2011 for mac, which i think is corresponding to Excel 2010.

    This is the code i am currently using, which doesn't work. The function is not beautiful, but it is working.

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    06-29-2011
    Location
    MUMBAI
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    85

    Re: Choosing between two alternatives with a checkbox

    Please Login or Register  to view this content.
    This might help u

    Adioos

  3. #3
    Registered User
    Join Date
    08-10-2012
    Location
    Umeå, Sweden
    MS-Off Ver
    Excel 2011
    Posts
    4

    Re: Choosing between two alternatives with a checkbox

    Sorry, but it didn't help me, maybe i don't understand exactly what you want me to do.

    If i split up the If function into two functions, it always chooses the one which is "False", does that indicate something specific? It seems like there's some small problem with the code that i can't find.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-29-2011
    Location
    MUMBAI
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    85

    Re: Choosing between two alternatives with a checkbox

    see the file attached. The code is in there. Run the macro Checkbox applies automatically.

    Cheers,




    checkbox.xls
    Last edited by vipul.halbe; 08-24-2012 at 03:18 AM.

  5. #5
    Registered User
    Join Date
    08-10-2012
    Location
    Umeå, Sweden
    MS-Off Ver
    Excel 2011
    Posts
    4

    Re: Choosing between two alternatives with a checkbox

    Thanks a lot vipul.halbe!

    This works great for me, really made my day!

  6. #6
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Choosing between two alternatives with a checkbox

    @ olosun

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  7. #7
    Registered User
    Join Date
    08-10-2012
    Location
    Umeå, Sweden
    MS-Off Ver
    Excel 2011
    Posts
    4

    Re: Choosing between two alternatives with a checkbox

    Okey thanks for the info. I was searching everywhere for that "thank" button, i saw it the last time i visited... Found how to mark the thread as solved also...

+ 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