+ Reply to Thread
Results 1 to 8 of 8

Sum Formulas Don't Work With Combo Boxes

  1. #1
    Registered User
    Join Date
    06-07-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    27

    Sum Formulas Don't Work With Combo Boxes

    Hi All

    Thanks for taking the time to read this, hopefully someone can point me in the right direction am going mad with this problem.
    I am trying to build a timesheet which is doing what I want other than none of my formulas now work.
    Originally I set it all up with Validation Lists but as the lists are so long the users found to much scrolling was required.

    Since then I have set up Active X Combo Boxes for Task Diversion and Time.
    None of the "SUM" Formulas are working any more, what do I need to do now the data is in Combo Boxes?
    There is a Time Combo Box in each cell in the range C5:C29 each one is linked to it's relative cell, so when the time is submitted it writes to file "Database". All this is working fine and values are copied over.
    I don't need any totals copied to another file I just want them to show in the Timesheet.
    The formulas that I had originally working are as follows:

    Total (min per day)
    =SUMIF(F5:F29,"Saturday",C5:C29)

    Total Time Submitted (Mins)
    =SUM(C5:C29)

    Time In Hours
    =SUM(E30/60)

    I have added a copy of the Timesheet, any help greatly appreciated (I have never used formulas in VBA).
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Sum Formulas Don't Work With Combo Boxes

    Time In Hours
    =SUM(E30/60)

    You don't need to SUM this, it is a simple division calculation. No SUMming required.
    Change it to

    =E30/60
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    06-07-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    27

    Re: Sum Formulas Don't Work With Combo Boxes

    Thanks for that Special K, I will amend the formula
    Still can't get any formulas to work at all, I don't think the formulas are reading the values in the combo boxes

  4. #4
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Sum Formulas Don't Work With Combo Boxes

    I don't think the formulas are reading the values in the combo boxes
    They can't. Formulas work with cells, not other controls - even if those controls are 'contained' in a cell. However you can link a combobox to a cell so that cell is updated with the value selected in the combobox. You can apply your formula to those cells no problem.

  5. #5
    Registered User
    Join Date
    06-07-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    27

    Re: Sum Formulas Don't Work With Combo Boxes

    Thanks for the response Cytop.
    I have filled in the Linked Cell field in each Combo Box property
    Combo Box 1 is linked to C5, Combo Box 2 is linked to C6 and so on all the way down the column from C5 to C29.
    I still can't get the formulas to work in any way
    Totally lost what I am doing wrong or what else I need to do to get this working

  6. #6
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Sum Formulas Don't Work With Combo Boxes

    The values in column C are not numbers, even when selecting a dropdown value from column C
    hence the SUM of C5:C29 is zero.

    This works
    in E30
    =SUMPRODUCT(VALUE(C5:C29))

  7. #7
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Sum Formulas Don't Work With Combo Boxes

    Whoops - forgot about the 'Text' issue... Apols.

  8. #8
    Registered User
    Join Date
    06-07-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    27

    Re: Sum Formulas Don't Work With Combo Boxes

    I never thought of the values being entered as text, thanks for pointing that out
    So if I change the format of values to number instead of text the formulas should then work?
    Do I just change the format in the list source date to number instead of general?

+ 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] Help with code for userform text boxes, combo boxes and excel
    By innerise in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-20-2014, 09:07 AM
  2. populating list boxes and combo boxes in a user form.
    By ahceinaej in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-10-2014, 11:54 AM
  3. assigning data to lists boxes and combo boxes in userforms
    By weston.roberts in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2011, 03:11 AM
  4. assigning data to lists boxes and combo boxes in userforms
    By weston.roberts in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-30-2011, 08:46 PM
  5. [SOLVED] Selecting subsets using combo boxes or list boxes
    By CLamar in forum Excel General
    Replies: 0
    Last Post: 06-01-2006, 02:45 PM
  6. [SOLVED] Combo boxes and formulas
    By TC in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-12-2006, 06:25 PM
  7. Re: Flaky combo boxes. Work around?
    By rjamison in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2005, 08:05 PM
  8. [SOLVED] Flaky combo boxes. Work around?
    By Don Wiss in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-20-2005, 10:06 AM

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