+ Reply to Thread
Results 1 to 6 of 6

Sum date but only if sum of date is greater than a value

  1. #1
    Registered User
    Join Date
    06-14-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Sum date but only if sum of date is greater than a value

    I own 12 of the same asset
    I rent the asset out to numerous clients on the same day on a various days in the year
    I want to be able to sum the total quantity quoted to clients, but only if it exceeds 12 on each day.

    01/05/17 - Quoted 10units - Sum = 0
    15/05/17 - Quoted 13units - Sum = 1
    17/05/17 - Quoted 20 units - Sum = 8
    20/05/17 - Quoted 4 units -
    20/05/17 - Quoted 6 units -
    20/05/17 - Quoted 9 units - Sum = 7

    Answer required = 16

    Basically, what total will I have to sub hire?

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,946

    Re: Sum date but only if sum of date is greater than a value

    An array formula, entered using Ctrl-Shift-Enter, with a formula like

    =SUM((C2:C10>12)*(C2:C10-12))

    Where C2:C10 contain the number of units (as a number).

    A non-array formula would be

    =SUMIF(C2:C10,">12")-COUNTIF(C2:C10,">12")*12
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    06-14-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Sum date but only if sum of date is greater than a value

    Gives an answer of 62 (sum of column C) , not the 16 required (sum of difference above 12 per day)

  4. #4
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Sum date but only if sum of date is greater than a value

    Hi ninja- try this ARRAY FORMULA. Select any cell, paste the formula in the formula bar, then press CTRL+SHIFT+ENTER to confirm:
    =SUM(IF(SUMIF($A:$A,$A:$A,$B:$B)>12,(SUMIF($A:$A,$A:$A,$B:$B)-12)/COUNTIF($A:$A,$A:$A),0))

    Over12s.png

    Please click the Add Reputation star below any helpful posts, and if you have your answer, mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee
    Last edited by leelnich; 05-14-2017 at 09:44 AM.

  5. #5
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,946

    Re: Sum date but only if sum of date is greater than a value

    Sorry - I misinterpreted your question.
    Last edited by Bernie Deitrick; 05-14-2017 at 01:53 PM.

  6. #6
    Registered User
    Join Date
    06-14-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Sum date but only if sum of date is greater than a value

    No problem. Thank-you for replying

+ 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] If date in G2 is greater than date in C3 then make date in G2 same as date in C3
    By moosetales in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-20-2015, 08:12 PM
  2. [SOLVED] VBA Macro to Color Row Text If Date in Cell is greater than system date
    By slick9456 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-24-2014, 06:09 PM
  3. [SOLVED] Macros for: If Today's Date minus other date is greater than certain amount of days Then
    By lottidotti in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-24-2012, 04:46 PM
  4. Replies: 5
    Last Post: 07-03-2012, 01:23 PM
  5. Replies: 6
    Last Post: 12-12-2011, 09:07 PM
  6. Replies: 4
    Last Post: 09-01-2011, 03:25 PM
  7. How do I sum a range if the date is is greater than today's date?
    By S2 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-08-2005, 04:05 PM

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