Sumproduct help

natetc

Board Regular
Joined
Oct 2, 2008
Messages
127
Hi I have a very long sumproduct formula and excel won't take it, 'The specified formula cannot be entered because it contains more values, references and/or names than are allowed in the current file format."

My formula consists of sumproducts with 3 variables and repeats about 30 times.

Sample:
=SUMPRODUCT(--(Sheet1!$F$1:$F$9999="APPLE"),--(Sheet1!$G$1:$G$9999="GOOD"),--(Sheet1!$B$1:$B$9999="SOLD"))+SUMPRODUCT(--(Sheet1!$F$1:$F$9999="ORANGE"),--(Sheet1!$G$1:$G$9999="GOOD"),--(Sheet1!$B$1:$B$9999="SOLD"))

Anyway to shorten this so I can get it into one cell? THANKS!
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

jeffreybrown

Well-known Member
Joined
Jul 28, 2004
Messages
5,149
Try...

=SUMPRODUCT(--(Sheet1!$F$1:$F$9999="APPLE")+(Sheet1!$F$1:$F$9999="ORANGE"),--(Sheet1!$G$1:$G$9999="GOOD"),--(Sheet1!$B$1:$B$9999="SOLD"))
 
Upvote 0

jeffreybrown

Well-known Member
Joined
Jul 28, 2004
Messages
5,149
Does this look right to you? If not what would you expect?

Sheet1

<TABLE style="PADDING-RIGHT: 2pt; PADDING-LEFT: 2pt; FONT-SIZE: 10pt; FONT-FAMILY: Arial,Arial; BACKGROUND-COLOR: #ffffff" cellSpacing=0 cellPadding=0 border=1><COLGROUP><COL style="FONT-WEIGHT: bold; WIDTH: 30px"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"></COLGROUP><TBODY><TR style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center"><TD> </TD><TD>B</TD><TD>C</TD><TD>D</TD><TD>E</TD><TD>F</TD><TD>G</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">1</TD><TD>SOLD</TD><TD> </TD><TD> </TD><TD> </TD><TD>APPLE</TD><TD>GOOD</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">2</TD><TD>SOLD</TD><TD> </TD><TD> </TD><TD> </TD><TD>APPLE</TD><TD>GOOD</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">3</TD><TD>SOLD</TD><TD> </TD><TD> </TD><TD> </TD><TD>ORANGE</TD><TD>GOOD</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">4</TD><TD>SOLD</TD><TD> </TD><TD> </TD><TD> </TD><TD>ORANGE</TD><TD>GOOD</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">5</TD><TD> </TD><TD> </TD><TD style="TEXT-ALIGN: center">4</TD><TD> </TD><TD> </TD><TD> </TD></TR></TBODY></TABLE>
<TABLE style="FONT-SIZE: 10pt; BORDER-LEFT-COLOR: #00ff00; BORDER-BOTTOM-COLOR: #00ff00; COLOR: #000000; BORDER-TOP-STYLE: groove; BORDER-TOP-COLOR: #00ff00; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: groove; BORDER-LEFT-STYLE: groove; BACKGROUND-COLOR: #fffcf9; BORDER-RIGHT-COLOR: #00ff00; BORDER-BOTTOM-STYLE: groove"><TBODY><TR><TD>Spreadsheet Formulas</TD></TR><TR><TD><TABLE style="FONT-SIZE: 9pt; FONT-FAMILY: Arial" cellSpacing=0 cellPadding=2 border=1><TBODY><TR style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #cacaca"><TD>Cell</TD><TD>Formula</TD></TR><TR><TD>D5</TD><TD>=SUMPRODUCT(--(Sheet1!$F$1:$F$9999="APPLE")+(Sheet1!$F$1:$F$9999="ORANGE"),--(Sheet1!$G$1:$G$9999="GOOD"),--(Sheet1!$B$1:$B$9999="SOLD"))</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>

Excel tables to the web >> http://www.excel-jeanie-html.de/index.php?f=1" target="_blank"> Excel Jeanie HTML 4
 
Upvote 0

Forum statistics

Threads
1,195,909
Messages
6,012,256
Members
441,687
Latest member
urimagic

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top