?
Solved

Sum data for a given range of months (if months are number or text)

Posted on 2016-08-14
5
Medium Priority
?
80 Views
Last Modified: 2016-08-15
Experts,

if given:
1/1/2016   1/2/2016  2/1/2016  2/15/2016  3/1/2016
with costs of
10/20/40/50

    Sum the costs for these months:
    if month is text:
    January, February, March

      if months are given in month format:
      1/1/2016; 2/10/2016; 3/25/2016

      What is the formula to sum those costs based on the months?
      I am not sure if I should use SUMIF (as an array) or SUM PRODUCT.

      Please see attached spreadsheet with necessary data and the formulas I have used but note they are not correct formulas.  

      thank you in advance....
      EE-SumIF-Dates.xlsx
      0
      Comment
      Question by:pdvsa
      [X]
      Welcome to Experts Exchange

      Add your voice to the tech community where 5M+ people just like you are talking about what matters.

      • Help others & share knowledge
      • Earn cash & points
      • Learn & ask questions
      • 3
      • 2
      5 Comments
       
      LVL 32

      Expert Comment

      by:Subodh Tiwari (Neeraj)
      ID: 41755477
      See if this works for you...

      =SUMPRODUCT(($B$5:$ALD$5<>"")*(TEXT($B$5:$ALD$5,"mmmm")=B$15)*$B$6:$ALD$6)
      

      Open in new window

      0
       

      Author Comment

      by:pdvsa
      ID: 41755526
      nice.  it worked for the months in text.
      Would you have a suggestion for the months in digit format (ie 1/1/2016)

      thank you
      0
       
      LVL 32

      Accepted Solution

      by:
      Subodh Tiwari (Neeraj) earned 2000 total points
      ID: 41755530
      If the dates criteria are in row7, try this....

      =SUMPRODUCT(($B$5:$ALD$5<>"")*(MONTH($B$5:$ALD$5)=MONTH(B$7))*$B$6:$ALD$6)
      

      Open in new window

      0
       

      Author Closing Comment

      by:pdvsa
      ID: 41756011
      perfect.  Greatful for your help.
      0
       
      LVL 32

      Expert Comment

      by:Subodh Tiwari (Neeraj)
      ID: 41756021
      You're welcome. Glad I could help.
      0

      Featured Post

      Independent Software Vendors: We Want Your Opinion

      We value your feedback.

      Take our survey and automatically be enter to win anyone of the following:
      Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

      Question has a verified solution.

      If you are experiencing a similar issue, please ask a related question

      This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
      Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
      Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
      Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

      752 members asked questions and received personalized solutions in the past 7 days.

      Join the community of 500,000 technology professionals and ask your questions.

      Join & Ask a Question