Can anyone tell me how to fix this SUMPRODUCT Formula. I am missing brackets or something.
This formula would be in cells in column E of Sheet2.
So basically I need a result in the cell from either the first part of the formula or the second part which either part is true.
=SUMPRODUCT(--(Sheet1!C$2:C$20=Sheet2!C9),--(Sheet1!G$2:G$20=Sheet2!D9),Sheet1!H$2:H$20),(--(Sheet1!C$2:C$20=Sheet2!C9),--(Sheet1!I$2:I$20=Sheet2!D9),Sheet1!J$2:J$20)
Sheet1
<TABLE style="PADDING-RIGHT: 2pt; PADDING-LEFT: 2pt; FONT-SIZE: 11pt; FONT-FAMILY: Calibri,Arial; BACKGROUND-COLOR: #ffffff" cellSpacing=0 cellPadding=0 border=1><COLGROUP><COL style="FONT-WEIGHT: bold; WIDTH: 30px"><COL style="WIDTH: 75px"><COL style="WIDTH: 118px"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"><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>A</TD><TD>B</TD><TD>C</TD><TD>D</TD><TD>E</TD><TD>F</TD><TD>G</TD><TD>H</TD><TD>I</TD><TD>J</TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">1</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #33cccc">Date</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #33cccc">Item</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #33cccc">Acc No</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #33cccc">US$ or R</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #33cccc"> </TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #33cccc">Rec</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #33cccc">Job No. A</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #33cccc">Job A US$</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #33cccc">Job No. B</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #33cccc">Job B US$</TD></TR><TR style="HEIGHT: 18px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">2</TD><TD style="TEXT-ALIGN: right">30/04/2011</TD><TD>Dog</TD><TD style="TEXT-ALIGN: right">9-0715</TD><TD style="BACKGROUND-COLOR: #ccccff">R4500</TD><TD style="TEXT-ALIGN: right">1.125</TD><TD> </TD><TD style="BACKGROUND-COLOR: #c0c0c0"> </TD><TD style="BACKGROUND-COLOR: #c0c0c0"> </TD><TD style="BACKGROUND-COLOR: #ccffcc">CASO33</TD><TD style="BACKGROUND-COLOR: #ccffcc; TEXT-ALIGN: right">1.125</TD></TR><TR style="HEIGHT: 18px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">3</TD><TD style="TEXT-ALIGN: right">5/05/2011</TD><TD>Cat</TD><TD style="TEXT-ALIGN: right">9-0705</TD><TD style="BACKGROUND-COLOR: #ccccff; TEXT-ALIGN: right">3</TD><TD style="TEXT-ALIGN: right">3</TD><TD> </TD><TD style="BACKGROUND-COLOR: #c0c0c0">CASO32</TD><TD style="BACKGROUND-COLOR: #c0c0c0; TEXT-ALIGN: right">1.5</TD><TD style="BACKGROUND-COLOR: #ccffcc">CASO33</TD><TD style="BACKGROUND-COLOR: #ccffcc; TEXT-ALIGN: right">1.5</TD></TR><TR style="HEIGHT: 18px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">4</TD><TD style="TEXT-ALIGN: right">5/05/2011</TD><TD>Rat</TD><TD style="TEXT-ALIGN: right">9-0805</TD><TD style="BACKGROUND-COLOR: #ccccff; TEXT-ALIGN: right">5</TD><TD style="TEXT-ALIGN: right">5</TD><TD> </TD><TD style="BACKGROUND-COLOR: #c0c0c0">CASO32</TD><TD style="BACKGROUND-COLOR: #c0c0c0; TEXT-ALIGN: right">2.5</TD><TD style="BACKGROUND-COLOR: #ccffcc">CASO33</TD><TD style="BACKGROUND-COLOR: #ccffcc; TEXT-ALIGN: right">2.5</TD></TR><TR style="HEIGHT: 18px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">5</TD><TD style="TEXT-ALIGN: right">6/05/2011</TD><TD>Cat</TD><TD style="TEXT-ALIGN: right">9-0705</TD><TD style="BACKGROUND-COLOR: #ccccff; TEXT-ALIGN: right">2.4</TD><TD style="TEXT-ALIGN: right">2.4</TD><TD> </TD><TD style="BACKGROUND-COLOR: #c0c0c0">CASO32</TD><TD style="BACKGROUND-COLOR: #c0c0c0; TEXT-ALIGN: right">1.2</TD><TD style="BACKGROUND-COLOR: #ccffcc">CASO33</TD><TD style="BACKGROUND-COLOR: #ccffcc; TEXT-ALIGN: right">1.2</TD></TR><TR style="HEIGHT: 18px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">6</TD><TD style="TEXT-ALIGN: right">6/05/2011</TD><TD>Dog</TD><TD style="TEXT-ALIGN: right">9-0715</TD><TD style="BACKGROUND-COLOR: #ccccff">R2000</TD><TD style="TEXT-ALIGN: right">0.5</TD><TD> </TD><TD style="BACKGROUND-COLOR: #c0c0c0">CASO32</TD><TD style="BACKGROUND-COLOR: #c0c0c0; TEXT-ALIGN: right">0.25</TD><TD style="BACKGROUND-COLOR: #ccffcc">CASO33</TD><TD style="BACKGROUND-COLOR: #ccffcc; TEXT-ALIGN: right">0.25</TD></TR><TR style="HEIGHT: 18px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">7</TD><TD style="TEXT-ALIGN: right">6/05/2011</TD><TD>Pig</TD><TD style="TEXT-ALIGN: right">9-010</TD><TD style="BACKGROUND-COLOR: #ccccff; TEXT-ALIGN: right">4</TD><TD style="TEXT-ALIGN: right">4</TD><TD> </TD><TD style="BACKGROUND-COLOR: #c0c0c0">CASO32</TD><TD style="BACKGROUND-COLOR: #c0c0c0; TEXT-ALIGN: right">4</TD><TD style="BACKGROUND-COLOR: #ccffcc"> </TD><TD style="BACKGROUND-COLOR: #ccffcc"> </TD></TR><TR style="HEIGHT: 18px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">8</TD><TD style="TEXT-ALIGN: right">6/05/2011</TD><TD>Dog</TD><TD style="TEXT-ALIGN: right">9-0715</TD><TD style="BACKGROUND-COLOR: #ccccff">R4000</TD><TD style="TEXT-ALIGN: right">1</TD><TD> </TD><TD style="BACKGROUND-COLOR: #c0c0c0">CASO32</TD><TD style="BACKGROUND-COLOR: #c0c0c0; TEXT-ALIGN: right">0.5</TD><TD style="BACKGROUND-COLOR: #ccffcc">CASO33</TD><TD style="BACKGROUND-COLOR: #ccffcc; TEXT-ALIGN: right">0.5</TD></TR><TR style="HEIGHT: 18px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">9</TD><TD style="TEXT-ALIGN: right">6/05/2011</TD><TD>Cat</TD><TD style="TEXT-ALIGN: right">9-0705</TD><TD style="BACKGROUND-COLOR: #ccccff">R43000</TD><TD style="TEXT-ALIGN: right">10.75</TD><TD> </TD><TD style="BACKGROUND-COLOR: #c0c0c0">CASO32</TD><TD style="BACKGROUND-COLOR: #c0c0c0; TEXT-ALIGN: right">5.375</TD><TD style="BACKGROUND-COLOR: #ccffcc">CASO33</TD><TD style="BACKGROUND-COLOR: #ccffcc; TEXT-ALIGN: right">5.375</TD></TR><TR style="HEIGHT: 18px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">10</TD><TD style="TEXT-ALIGN: right">6/05/2011</TD><TD>Cat</TD><TD style="TEXT-ALIGN: right">9-0705</TD><TD style="BACKGROUND-COLOR: #ccccff">R30000</TD><TD style="TEXT-ALIGN: right">7.5</TD><TD> </TD><TD style="BACKGROUND-COLOR: #c0c0c0">CASO32</TD><TD style="BACKGROUND-COLOR: #c0c0c0; TEXT-ALIGN: right">3.75</TD><TD style="BACKGROUND-COLOR: #ccffcc">CASO33</TD><TD style="BACKGROUND-COLOR: #ccffcc; TEXT-ALIGN: right">3.75</TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">11</TD><TD style="TEXT-ALIGN: right">7/05/2011</TD><TD>Rat</TD><TD style="TEXT-ALIGN: right">9-0805</TD><TD style="BACKGROUND-COLOR: #ccccff; TEXT-ALIGN: right">10</TD><TD style="TEXT-ALIGN: right">10</TD><TD> </TD><TD style="BACKGROUND-COLOR: #c0c0c0">CASO32</TD><TD style="BACKGROUND-COLOR: #c0c0c0; TEXT-ALIGN: right">5</TD><TD style="BACKGROUND-COLOR: #ccffcc">CASO33</TD><TD style="BACKGROUND-COLOR: #ccffcc; TEXT-ALIGN: right">5</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
Result I am trying to achieve.
Sheet2
<TABLE style="PADDING-RIGHT: 2pt; PADDING-LEFT: 2pt; FONT-SIZE: 11pt; FONT-FAMILY: Calibri,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: 199px"><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>A</TD><TD>B</TD><TD>C</TD><TD>D</TD><TD>E</TD><TD>F</TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">1</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #33cccc; TEXT-ALIGN: center" rowSpan=2>Date Entered</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #33cccc; TEXT-ALIGN: center" rowSpan=2>Account Name/Description</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #33cccc; TEXT-ALIGN: center" rowSpan=2>GL/AC No.</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #33cccc; TEXT-ALIGN: center" rowSpan=2>Job No.</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #33cccc; TEXT-ALIGN: center" colSpan=2>Amount</TD></TR><TR style="HEIGHT: 18px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">2</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #33cccc; TEXT-ALIGN: center">Debit</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #33cccc; TEXT-ALIGN: center">Credit</TD></TR><TR style="HEIGHT: 18px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">3</TD><TD style="TEXT-ALIGN: center">1</TD><TD style="TEXT-ALIGN: center">2</TD><TD style="TEXT-ALIGN: center">3</TD><TD style="TEXT-ALIGN: center">4</TD><TD style="TEXT-ALIGN: center">5</TD><TD style="TEXT-ALIGN: center">6</TD></TR><TR style="HEIGHT: 18px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">4</TD><TD> </TD><TD style="FONT-SIZE: 10pt">Cat</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ccccff; TEXT-ALIGN: right">9-0705</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #c0c0c0">CASO32</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ffffcc; TEXT-ALIGN: right">$11.83</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ccffcc"> </TD></TR><TR style="HEIGHT: 18px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">5</TD><TD> </TD><TD style="FONT-SIZE: 10pt">Cat</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ccccff; TEXT-ALIGN: right">9-0705</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #c0c0c0">CASO33</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ffffcc; TEXT-ALIGN: right">$11.83</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ccffcc"> </TD></TR><TR style="HEIGHT: 18px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">6</TD><TD> </TD><TD style="FONT-SIZE: 10pt">Dog</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ccccff; TEXT-ALIGN: right">9-0715</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #c0c0c0">CASO32</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ffffcc; TEXT-ALIGN: right">$0.75</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ccffcc"> </TD></TR><TR style="HEIGHT: 18px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">7</TD><TD> </TD><TD style="FONT-SIZE: 10pt">Dog</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ccccff; TEXT-ALIGN: right">9-0715</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #c0c0c0">CASO33</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ffffcc; TEXT-ALIGN: right">$1.88</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ccffcc"> </TD></TR><TR style="HEIGHT: 18px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">8</TD><TD> </TD><TD style="FONT-SIZE: 10pt">Rat</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ccccff; TEXT-ALIGN: right">9-0805</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #c0c0c0">CASO32</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ffffcc; TEXT-ALIGN: right">$7.50</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ccffcc"> </TD></TR><TR style="HEIGHT: 18px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">9</TD><TD> </TD><TD style="FONT-SIZE: 10pt">Rat</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ccccff; TEXT-ALIGN: right">9-0805</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #c0c0c0">CASO33</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ffffcc; TEXT-ALIGN: right">$7.50</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ccffcc"> </TD></TR><TR style="HEIGHT: 18px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">10</TD><TD> </TD><TD style="FONT-SIZE: 10pt">Pig</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ccccff; TEXT-ALIGN: right">9-0710</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #c0c0c0">CASO32</TD><TD style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #ffffcc; TEXT-ALIGN: right">$4.00</TD><TD style="BACKGROUND-COLOR: #ccffcc"> </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