+ Reply to Thread
Results 1 to 1 of 1

VBA Excel checkbox results with If statement not correct

  1. #1
    Registered User
    Join Date
    10-08-2013
    Location
    Birmingham
    MS-Off Ver
    Excel 2007
    Posts
    3

    Cool VBA Excel checkbox results with If statement not correct

    Hi Guys,

    Hope you are well. I keep on going around in circles and really need some help.
    Okay, so I have got two worksheets. The first worksheet is called 'sheet1' and has two checkbox's called 'check1' and 'check2' and a button which pressed, executes the below code. The second worksheet is called 'results'.

    The worksheet 'results' is as follows : A1 = Monday, B1 = 1, C1 = 1
    A2 = Tuesday, B2 = 1, C2 = -4146
    A3 = Wednesday, B3 = -4146, C3 = 1
    A4 = Thursday,B4 = -4146, C4 = -4146

    Depending on the checkboxes ticked I want the below result to appear in ‘sheet1’:
    1)Check1 = ticked, check2 = ticked=> A1 = Monday, B1 = 1, C1 = 1 (works fine)
    2)Check1 = ticked, check2 = not ticked=> A1 = Monday, B1 = 1, C1 = 1
    A2 = Tuesday, B2 = 1, C2 = -4146 (does not work)
    3)Check1 = not ticked, check2 = ticked=> A1 = Monday, B1 = 1, C1 = 1
    A2 = Wednesday, B2 = -4146, C2 = 1(does not work)
    4)Check1 = not ticked, check2 = not ticked=>A1 = Thursday,B1 = -4146, C1 = -4146 (works fine)

    I am not sure where I am going wrong. I searched all over the web and loads of forums and can’t find a solution. It probably something really easy for you guys to resolve
    If you could help me, I would greatly appreciated it!
    Thanks
    Chaz


    Please Login or Register  to view this content.
    Last edited by Leith Ross; 02-16-2014 at 10:56 PM. Reason: Added Code Tags

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Not getting correct if(and results
    By Groovicles in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-28-2014, 03:32 PM
  2. VLOOKUP not returning correct results
    By Lea724 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-22-2011, 02:38 AM
  3. Return a string from multiple checkbox results
    By dillinger in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2010, 11:46 AM
  4. [SOLVED] conditional not finding correct results
    By Craig in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-01-2006, 11:40 AM
  5. [SOLVED] SQL Query not returning correct results
    By Stephen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-20-2006, 08:25 AM

Tags for this Thread

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