# SUMPRODUCT Help

#### Brent H

##### New Member
I need help with a text summing formula that incoperates two criteria over two worksheets. On worksheet One I have an account number in cells A1:A600, on worksheet Two I have corresponding account numbers in A1:A5000 (each account has multiple entries on this second worksheet). In addition on worksheet Two there is a question in cells B1:B5000 for each account with a Y or N answer in cells C1:C5000. I need a formula to enter on sheet one that will return the sum of Y answers for the account I specify in the formula.

### Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

#### hiker95

##### Well-known Member
Brent H,

Welcome to the MrExcel forum.

Excel Workbook
ABC
11?Y
22?
33?Y
41?Y
52?Y
63?
71?Y
82?Y
93?Y
107?Y
117?
127?Y
137?
147?Y
157?Y
167?Y
17
Sheet2

Excel Workbook
ABCDE
11Account NbrY or NSum
227Y5
33
44
55
66
77
88
99
1010
11
Sheet1

#### jim may

##### Well-known Member
Excel Workbook
ABC
11003
22001
33000
Sheet1
Excel 2007
Cell Formulas
RangeFormula
C1=SUMPRODUCT(--(Sheet2!\$A\$1:\$A\$10=Sheet1!A1),--(Sheet2!\$C\$1:\$C\$10="Y"))
C2=SUMPRODUCT(--(Sheet2!\$A\$1:\$A\$10=Sheet1!A2),--(Sheet2!\$C\$1:\$C\$10="Y"))
C3=SUMPRODUCT(--(Sheet2!\$A\$1:\$A\$10=Sheet1!A3),--(Sheet2!\$C\$1:\$C\$10="Y"))
Excel Workbook
ABC
1100Q1Y
2200Q2N
3200Q3N
4200Q4Y
5100Q1N
6300Q2N
7100Q3Y
8300Q4N
9200Q1N
10100Q2Y
Sheet2
Excel 2007

#### Brent H

##### New Member
Thank you. It worked perfectly

1,106,912
Messages
5,514,127
Members
408,983
Latest member
mlee13