My following query is based on using Excel 2003
In worksheet 1 I have a number of collumns relating to sales data (see below).
In worksheet 2, I want to display a summary of the value of business per product, provided a date is in the paid collumn. So for pensions I would expect 1200 to be returned based on the table below.
The formula I have at the moment is as follows:
=SUMPRODUCT((Sheet1!a$2:a$100="Pension")*(sheet1!c$2:c$100>"0"),(sheet1!b$2:b$100))
This unfortunately returns 0.
<TABLE style="WIDTH: 174pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=232 border=0 x:str><COLGROUP><COL style="WIDTH: 48pt" width=64><COL style="WIDTH: 71pt; mso-width-source: userset; mso-width-alt: 3384" width=95><COL style="WIDTH: 55pt; mso-width-source: userset; mso-width-alt: 2588" width=73><TBODY><TR style="HEIGHT: 15pt" height=20><TD class=xl24 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext 1.5pt solid; BORDER-LEFT: windowtext 1.5pt solid; WIDTH: 48pt; BORDER-BOTTOM: windowtext 1.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" width=64 height=20>Product</TD><TD class=xl25 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext 1.5pt solid; BORDER-LEFT: windowtext; WIDTH: 71pt; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" width=95>Value</TD><TD class=xl26 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext 1.5pt solid; BORDER-LEFT: windowtext; WIDTH: 55pt; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" width=73>Paid</TD></TR><TR style="HEIGHT: 14.4pt" height=19><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1.5pt solid; BORDER-BOTTOM: windowtext 1.5pt solid; HEIGHT: 14.4pt; BACKGROUND-COLOR: transparent" height=19>Pension</TD><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" x:num>1000</TD><TD class=xl28 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; WIDTH: 55pt; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" width=73></TD></TR><TR style="HEIGHT: 14.4pt" height=19><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1.5pt solid; BORDER-BOTTOM: windowtext 1.5pt solid; HEIGHT: 14.4pt; BACKGROUND-COLOR: transparent" height=19>Pension</TD><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" x:num>1000</TD><TD class=xl29 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" x:num="40603">01/03/2011</TD></TR><TR style="HEIGHT: 14.4pt" height=19><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1.5pt solid; BORDER-BOTTOM: windowtext 1.5pt solid; HEIGHT: 14.4pt; BACKGROUND-COLOR: transparent" height=19>Pension</TD><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" x:num>1000</TD><TD class=xl29 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent"></TD></TR><TR style="HEIGHT: 14.4pt" height=19><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1.5pt solid; BORDER-BOTTOM: windowtext 1.5pt solid; HEIGHT: 14.4pt; BACKGROUND-COLOR: transparent" height=19>Savings</TD><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" x:num>5000</TD><TD class=xl30 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; WIDTH: 55pt; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" width=73></TD></TR><TR style="HEIGHT: 14.4pt" height=19><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1.5pt solid; BORDER-BOTTOM: windowtext 1.5pt solid; HEIGHT: 14.4pt; BACKGROUND-COLOR: transparent" height=19>Pension</TD><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" x:num>200</TD><TD class=xl28 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; WIDTH: 55pt; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" width=73 x:num="40603">01/03/2011</TD></TR><TR style="HEIGHT: 14.4pt" height=19><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1.5pt solid; BORDER-BOTTOM: windowtext 1.5pt solid; HEIGHT: 14.4pt; BACKGROUND-COLOR: transparent" height=19>Protection</TD><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" x:num>1500</TD><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent"></TD></TR></TBODY></TABLE>
I'm probably missing something really obvious, but have got a bit of a mental block on this one now!
Thanks in advance.
In worksheet 1 I have a number of collumns relating to sales data (see below).
In worksheet 2, I want to display a summary of the value of business per product, provided a date is in the paid collumn. So for pensions I would expect 1200 to be returned based on the table below.
The formula I have at the moment is as follows:
=SUMPRODUCT((Sheet1!a$2:a$100="Pension")*(sheet1!c$2:c$100>"0"),(sheet1!b$2:b$100))
This unfortunately returns 0.
<TABLE style="WIDTH: 174pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=232 border=0 x:str><COLGROUP><COL style="WIDTH: 48pt" width=64><COL style="WIDTH: 71pt; mso-width-source: userset; mso-width-alt: 3384" width=95><COL style="WIDTH: 55pt; mso-width-source: userset; mso-width-alt: 2588" width=73><TBODY><TR style="HEIGHT: 15pt" height=20><TD class=xl24 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext 1.5pt solid; BORDER-LEFT: windowtext 1.5pt solid; WIDTH: 48pt; BORDER-BOTTOM: windowtext 1.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" width=64 height=20>Product</TD><TD class=xl25 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext 1.5pt solid; BORDER-LEFT: windowtext; WIDTH: 71pt; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" width=95>Value</TD><TD class=xl26 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext 1.5pt solid; BORDER-LEFT: windowtext; WIDTH: 55pt; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" width=73>Paid</TD></TR><TR style="HEIGHT: 14.4pt" height=19><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1.5pt solid; BORDER-BOTTOM: windowtext 1.5pt solid; HEIGHT: 14.4pt; BACKGROUND-COLOR: transparent" height=19>Pension</TD><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" x:num>1000</TD><TD class=xl28 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; WIDTH: 55pt; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" width=73></TD></TR><TR style="HEIGHT: 14.4pt" height=19><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1.5pt solid; BORDER-BOTTOM: windowtext 1.5pt solid; HEIGHT: 14.4pt; BACKGROUND-COLOR: transparent" height=19>Pension</TD><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" x:num>1000</TD><TD class=xl29 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" x:num="40603">01/03/2011</TD></TR><TR style="HEIGHT: 14.4pt" height=19><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1.5pt solid; BORDER-BOTTOM: windowtext 1.5pt solid; HEIGHT: 14.4pt; BACKGROUND-COLOR: transparent" height=19>Pension</TD><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" x:num>1000</TD><TD class=xl29 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent"></TD></TR><TR style="HEIGHT: 14.4pt" height=19><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1.5pt solid; BORDER-BOTTOM: windowtext 1.5pt solid; HEIGHT: 14.4pt; BACKGROUND-COLOR: transparent" height=19>Savings</TD><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" x:num>5000</TD><TD class=xl30 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; WIDTH: 55pt; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" width=73></TD></TR><TR style="HEIGHT: 14.4pt" height=19><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1.5pt solid; BORDER-BOTTOM: windowtext 1.5pt solid; HEIGHT: 14.4pt; BACKGROUND-COLOR: transparent" height=19>Pension</TD><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" x:num>200</TD><TD class=xl28 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; WIDTH: 55pt; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" width=73 x:num="40603">01/03/2011</TD></TR><TR style="HEIGHT: 14.4pt" height=19><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1.5pt solid; BORDER-BOTTOM: windowtext 1.5pt solid; HEIGHT: 14.4pt; BACKGROUND-COLOR: transparent" height=19>Protection</TD><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent" x:num>1500</TD><TD class=xl27 style="BORDER-RIGHT: windowtext 1.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 1.5pt solid; BACKGROUND-COLOR: transparent"></TD></TR></TBODY></TABLE>
I'm probably missing something really obvious, but have got a bit of a mental block on this one now!
Thanks in advance.