SUMPRODUCT problem

J

juliejg1

I have the following formula:

=SUMPRODUCT(Data!$T$6:Data!$T$5000="Long
Term")*SUM(Data!$BE$6:Data!$BF$5000)/SUM(Data!$BE$6:Data!$BF$5000)
which produces the wrong answer.

Column T contains "Long Term", "Short Term", "Spot"
Column BE contains spend for January, BF for February, BG for March, etc...

I would like to calculate what percentage of year to date total spend there
is for "long term" contracts for February. This calculation would be: (Total
"long term" spend for Jan and Feb) / (Total spend year to date)
 
J

juliejg1

Perfect! Thanks!

Bernard Liengme said:
Close but not quite there. Try
=SUMPRODUCT((Data!$T$6:Data!$T$5000="Long
Term")*(Data!$BE$6:Data!$BF$5000))/SUM(Data!$BE$6:Data!$BF$5000)
or
=SUMPRODUCT(--(Data!$T$6:Data!$T$5000="Long
Term"),Data!$BE$6:Data!$BF$5000)/SUM(Data!$BE$6:Data!$BF$5000)

For more details on SUMPRODUCT
Bob Phillips
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
J.E McGimpsey
http://mcgimpsey.com/excel/formulae/doubleneg.html
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email
 
D

Don Guillett

For future shorter formulas, you shouldn't need the second data!
=SUMPRODUCT((Data!$T$6:Data!$T$5000="Long
=SUMPRODUCT((Data!$T$6:$T$5000="Long
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

SUMIF Question 3
SumProduct not right 7
Sumproduct/match problem 2
sumproduct problem 6
use sumif / Sumproduct for year data 4
Mapping strings to integers 5
SUMPRODUCT with TEXT and dates 1
sumproduct & dates 3

Top