ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sumproduct function? (https://www.excelbanter.com/excel-worksheet-functions/100468-sumproduct-function.html)

Claudia

Sumproduct function?
 
In workbook 1, I have a table with data from various companies:

Company x Company y Company z
apples
apples
oranges
peaches
oranges

In workbook 2, I have the following summary table:

Company ?
apples
oranges
peaches

How do I sum for the values in colum a based on the company name I put at
the head of column b? I have tried a sumproduct formula but I keep getting a
#value error.

Thanks
Claudia

Biff

Sumproduct function?
 
Hi!

If I understand:

A2:A6 =
apples
apples
oranges
peaches
oranges


B1:D1 =
Company x Company y Company z


A10 =
apples


B9 =
Company ?


=SUMIF(A2:A6,A10,INDEX(B2:D6,,MATCH(B9,B1:D1,0)))

Biff

"Claudia" wrote in message
...
In workbook 1, I have a table with data from various companies:

Company x Company y Company z
apples
apples
oranges
peaches
oranges

In workbook 2, I have the following summary table:

Company ?
apples
oranges
peaches

How do I sum for the values in colum a based on the company name I put at
the head of column b? I have tried a sumproduct formula but I keep
getting a
#value error.

Thanks
Claudia




Claudia

Sumproduct function?
 
Biff,

Thanks a bunch. It works like a charm.

Claudia


"Biff" wrote:

Hi!

If I understand:

A2:A6 =
apples
apples
oranges
peaches
oranges


B1:D1 =
Company x Company y Company z


A10 =
apples


B9 =
Company ?


=SUMIF(A2:A6,A10,INDEX(B2:D6,,MATCH(B9,B1:D1,0)))

Biff

"Claudia" wrote in message
...
In workbook 1, I have a table with data from various companies:

Company x Company y Company z
apples
apples
oranges
peaches
oranges

In workbook 2, I have the following summary table:

Company ?
apples
oranges
peaches

How do I sum for the values in colum a based on the company name I put at
the head of column b? I have tried a sumproduct formula but I keep
getting a
#value error.

Thanks
Claudia





Biff

Sumproduct function?
 
You're welcome. Thanks for the feedback!

Biff

"Claudia" wrote in message
...
Biff,

Thanks a bunch. It works like a charm.

Claudia


"Biff" wrote:

Hi!

If I understand:

A2:A6 =
apples
apples
oranges
peaches
oranges


B1:D1 =
Company x Company y Company z


A10 =
apples


B9 =
Company ?


=SUMIF(A2:A6,A10,INDEX(B2:D6,,MATCH(B9,B1:D1,0)))

Biff

"Claudia" wrote in message
...
In workbook 1, I have a table with data from various companies:

Company x Company y Company z
apples
apples
oranges
peaches
oranges

In workbook 2, I have the following summary table:

Company ?
apples
oranges
peaches

How do I sum for the values in colum a based on the company name I put
at
the head of column b? I have tried a sumproduct formula but I keep
getting a
#value error.

Thanks
Claudia








All times are GMT +1. The time now is 01:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com