Solved

SUMPRODUCT function

Posted on 2011-03-08
5
369 Views
Last Modified: 2012-05-11
I am trying to use the  SUMPRODUCT function but it's new to me.  The key formula is in cell E22.  I am trying to sum the values in the range C6:R9 for all values that are greater than the year 2010 and less than the variable year in B21.  

As it is, it will only sum the values in one row for the range C6:R6.  How can I fix this?
Exp-Analysis.xls
0
Comment
Question by:johnnyloff
5 Comments
 
LVL 50

Accepted Solution

by:
barry houdini earned 250 total points
Comment Utility
Hello johnnyloff,

try this with small syntax change

=SUMPRODUCT(C6:R9*(2010<B21)*(C4:R4>=2010)*(C4:R4<=B21))

regards, barry
0
 
LVL 50

Expert Comment

by:barry houdini
Comment Utility
....I don't think you need (2010<B21) either, so you can use just

=SUMPRODUCT(C6:R9*(C4:R4>=2010)*(C4:R4<=B21))

barry
0
 
LVL 16

Expert Comment

by:santoshmotwani
Comment Utility
=SUMPRODUCT(C6:R6*(C4:R4>=2010)*(C4:R4<=B21))
0
 

Author Closing Comment

by:johnnyloff
Comment Utility
Perfect.
0
 
LVL 39

Expert Comment

by:nutsch
Comment Utility
you don't really need the 2010<B21 part, so you can do with

=SUMPRODUCT(C6:R6,((C4:R4>=2010)*(C4:R4<=B21)))

This will only return row 6, if you want more row, you need to add more sumproducts.

=SUMPRODUCT(C6:R6,((C4:R4>=2010)*(C4:R4<=B21)))+SUMPRODUCT(C7:R7,((C4:R4>=2010)*(C4:R4<=B21)))

etc

Or am I missing part of your question,

THomas
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now