+ Reply to Thread
Results 1 to 2 of 2

Making a sum reach a minimum value

  1. #1
    Registered User
    Join Date
    06-25-2016
    Location
    tennessee
    MS-Off Ver
    Excel mobile app
    Posts
    7

    Making a sum reach a minimum value

    I previously got some help with this, but the formula isn't working right now due to a change in the sheet. The file is a timesheet. I need cell J21 to total j5 through j18 and I need to make sure the total is a minimum of an average of 8 hours for every cell that has a time in it. For example if we only worked 4 hours a day for two days and that was it, J21 would need to show 16 hours not the 8 actually worked. But if the total is more than the 8 hour average, for example we worked 10 hours for two days J21 would need to be 20 hours. Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: Making a sum reach a minimum value

    I would suggest that you apply your COUNTA to column D, so that it counts the number of days worked, then the formula in J21 will become:

    =MAX(SUM(J5:J18),COUNTA(D5:D18)*8/24)

    Note that you have to divide by 24 in order to convert the count into hours. It's also a good idea to apply a Custom Format to cells J20 and J21 of [h]:mm, which will prevent the hours wrapping if they are above 24.

    Hope this helps.

    Pete

+ 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. Top of worksheet out of reach
    By excelname in forum Excel General
    Replies: 2
    Last Post: 08-06-2014, 05:58 PM
  2. Macro to calculate minimum time, cash to reach a certain level
    By hyped78 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-09-2013, 09:36 AM
  3. [SOLVED] Reach specific value
    By chrism_cfu in forum Excel General
    Replies: 3
    Last Post: 12-04-2013, 05:55 AM
  4. Replies: 7
    Last Post: 04-17-2013, 03:53 PM
  5. Excel 2007 : Minimum Number Required to Reach Goal
    By ikevinax in forum Excel General
    Replies: 1
    Last Post: 06-16-2011, 12:53 PM
  6. Find minimum SUM if no minimum number in row
    By zbor in forum Excel General
    Replies: 9
    Last Post: 12-25-2009, 05:04 AM
  7. [SOLVED] How to lookup the minimum, 2nd minimum and 3rd minimum.........
    By Mark McDonough in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-15-2006, 04:45 PM
  8. [SOLVED] Sum of row until you reach a certain amount
    By Andman in forum Excel General
    Replies: 3
    Last Post: 03-25-2005, 03: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