Hi, have a look at below, see if it helps:
<TABLE style="PADDING-RIGHT: 2pt; PADDING-LEFT: 2pt; FONT-SIZE: 8pt; FONT-FAMILY: Arial,Arial; BACKGROUND-COLOR: #ffffff" cellSpacing=0 cellPadding=0 border=1><COLGROUP><COL style="FONT-WEIGHT: bold; WIDTH: 30px"><COL style="WIDTH: 56px"><COL style="WIDTH: 61px"><COL style="WIDTH: 56px"><COL style="WIDTH: 18px"><COL style="WIDTH: 61px"></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></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">1</TD><TD style="FONT-WEIGHT: bold">Person</TD><TD style="FONT-WEIGHT: bold">Date</TD><TD style="FONT-WEIGHT: bold">Sales</TD><TD></TD><TD style="FONT-WEIGHT: bold">Variables</TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">2</TD><TD style="BACKGROUND-COLOR: #ccffcc">a</TD><TD style="BACKGROUND-COLOR: #ccffcc; TEXT-ALIGN: right">31/05/2011</TD><TD style="BACKGROUND-COLOR: #ccffcc; TEXT-ALIGN: right">1</TD><TD></TD><TD style="BACKGROUND-COLOR: #ffff99">a</TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">3</TD><TD>a</TD><TD style="TEXT-ALIGN: right">01/06/2011</TD><TD style="TEXT-ALIGN: right">3</TD><TD></TD><TD style="BACKGROUND-COLOR: #ffff99; TEXT-ALIGN: right">31/05/2011</TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">4</TD><TD style="BACKGROUND-COLOR: #ccffcc">a</TD><TD style="BACKGROUND-COLOR: #ccffcc; TEXT-ALIGN: right">31/05/2011</TD><TD style="BACKGROUND-COLOR: #ccffcc; TEXT-ALIGN: right">7</TD><TD></TD><TD></TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">5</TD><TD>b</TD><TD style="TEXT-ALIGN: right">31/05/2011</TD><TD style="TEXT-ALIGN: right">2</TD><TD></TD><TD></TD></TR><TR style="HEIGHT: 20px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">6</TD><TD>b</TD><TD style="TEXT-ALIGN: right">31/05/2011</TD><TD style="TEXT-ALIGN: right">4</TD><TD></TD><TD style="FONT-WEIGHT: bold">Result</TD></TR><TR style="HEIGHT: 20px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">7</TD><TD>b</TD><TD style="TEXT-ALIGN: right">01/06/2011</TD><TD style="TEXT-ALIGN: right">8</TD><TD></TD><TD style="BACKGROUND-COLOR: #ccffff; TEXT-ALIGN: right">8</TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">8</TD><TD>c</TD><TD style="TEXT-ALIGN: right">31/05/2011</TD><TD style="TEXT-ALIGN: right">3</TD><TD></TD><TD></TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">9</TD><TD>c</TD><TD style="TEXT-ALIGN: right">01/06/2011</TD><TD style="TEXT-ALIGN: right">5</TD><TD></TD><TD></TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">10</TD><TD>c</TD><TD style="TEXT-ALIGN: right">01/06/2011</TD><TD style="TEXT-ALIGN: right">9</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>E7</TD><TD>=SUMPRODUCT(--($A$2:$A$10=E2),--($B$2:$B$10=E3),$C$2:$C$10)</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
The green rows are the ones where the variables (in the yellow cells) match and the blue cell is the resultant output (total number of sales for person a on date 31/05/2011)