You are here:

# Excel/Sum product date ranges

Question
QUESTION: Good afternoon,

I am writing a Sumproduct formula but need to add the figures that fall on a particular date range. The date range is essentially >=Q2 & <=Q3 but i cannot get these to work in my sumproduct formula. Also as the formula is continual I need the date range to move to the next column as I drag the fomula.

Can you help?

---------- FOLLOW-UP ----------

QUESTION: =IF(-SUMPRODUCT(('EEEF '!\$A\$7:\$A\$45="Projected distribution")*('EEEF '!\$C\$6:\$G\$6=\$B13)*'EEEF '!\$C\$7:\$G\$45)+SUM(\$O\$13:O13)>0,(-SUMPRODUCT(('EEEF '!\$A\$7:\$A\$45="Projected distribution")*('EEEF '!\$C\$6:\$G\$6=\$B13)*'EEEF '!\$C\$7:\$G\$45)),IF(-SUM(\$O13:O13)=0,0,-SUM(\$O13:O13)))

But I need to add a date range criteria so that within the nested sumproduct section only the items with a date in Cell Q2 and Cell Q3.

Let me know if you need more details.

Thanks,
Mike

ANSWER: Still missing is what cell(s) do you want to ensure lie between Q2 & Q3?

---------- FOLLOW-UP ----------

QUESTION: 'EEEF '!\$B\$7:\$B\$45

Is the date range criteria. Noting that EEEF is a sheet tab.

Is there anything else you need?

Thanks,
Mike

=IF(-SUMPRODUCT(('EEEF '!\$A\$7:\$A\$45="Projected distribution")*('EEEF '!\$B\$7:\$B\$45>=\$Q\$2)*('EEEF '!\$B\$7:\$B\$45<=\$Q\$3)*('EEEF '!\$C\$6:\$G\$6=\$B13)*'EEEF '!\$C\$7:\$G\$45)+SUM(\$O\$13:O13)>0,(-SUMPRODUCT(('EEEF '!\$A\$7:\$A\$45="Projected distribution")*('EEEF '!\$B\$7:\$B\$45>=\$Q\$2)*('EEEF '!\$B\$7:\$B\$45<=\$Q\$3)*('EEEF '!\$C\$6:\$G\$6=\$B13)*'EEEF '!\$C\$7:\$G\$45)),IF(-SUM(\$O13:O13)=0,0,-SUM(\$O13:O13)))

but the last piece is redundant - IF(-SUM(\$O13:O13)=0,0,-SUM(\$O13:O13)) should simply be -SUM(\$O13:O13)
Questioner's Rating
 Rating(1-10) Knowledgeability = 10 Clarity of Response = 10 Politeness = 10 Comment Bob, Thank you very much that's fantastic. Very impressive. Thanks again, Mike

This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

#### Bob Umlas

##### Expertise

I`m a Microsoft Excel MVP (Most Valuable Professional) and have been since the inception of the program in 1995. I can answer every kind of Excel question except: API, Importing/exporting to other programs (powerpoint, word,...) Also check out my in-person training link at http://www.thumbtack.com/ny/new-york/excel-training/

##### Experience

Worked with MS Excel since version 0.99 (on the Mac!). Was contributing editor to Excellence Magazine, having written >300 articles. John Walkenbach said of me "I finally met someone who knows as much about Excel as I do."

Publications
Excellence, The Expert, Microsoft

Education/Credentials
BA in math, Hofstra University, 1965

Awards and Honors
MVP
Led sessions for the Convergence 2004-2006 seminar on Excel tips & tricks