ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Array Function? (https://www.excelbanter.com/excel-worksheet-functions/237596-array-function.html)

Johnnie[_2_]

Array Function?
 
A B C
1 Company 1 10 Company 1
2 Company 2 10
3 Company 3 10
4 Company 2 8
5 Company 1 7
6 Company 1 6
7 Company 3 8

In C2 I am using this function =sumproduct(--$a$1:$a$7="Company 1"),b1:b7)
I keep getting an error and I am not sure what I am missing. Any help is
great appreciated.

Johnnie

Don Guillett

Array Function?
 
=sumproduct(($a$1:$a$7="Company 1")*b1:b7)
or
=sumproduct(--($a$1:$a$7="Company 1"),b1:b7)


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Johnnie" wrote in message
...
A B C
1 Company 1 10 Company 1
2 Company 2 10
3 Company 3 10
4 Company 2 8
5 Company 1 7
6 Company 1 6
7 Company 3 8

In C2 I am using this function =sumproduct(--$a$1:$a$7="Company 1"),b1:b7)
I keep getting an error and I am not sure what I am missing. Any help is
great appreciated.

Johnnie



Mike H

Array Function?
 
Hi,

try this

=SUMPRODUCT(--($A$1:$A$7="Company 1"),B1:B7)

or this

=SUMPRODUCT((A1:A7="Company 1")*(B1:B7))

Mike

"Johnnie" wrote:

A B C
1 Company 1 10 Company 1
2 Company 2 10
3 Company 3 10
4 Company 2 8
5 Company 1 7
6 Company 1 6
7 Company 3 8

In C2 I am using this function =sumproduct(--$a$1:$a$7="Company 1"),b1:b7)
I keep getting an error and I am not sure what I am missing. Any help is
great appreciated.

Johnnie


Eduardo

Array Function?
 
Hi,
very close

=sumproduct(--($a$1:$a$7="Company 1"),$b$1:$b$7)

"Johnnie" wrote:

A B C
1 Company 1 10 Company 1
2 Company 2 10
3 Company 3 10
4 Company 2 8
5 Company 1 7
6 Company 1 6
7 Company 3 8

In C2 I am using this function =sumproduct(--$a$1:$a$7="Company 1"),b1:b7)
I keep getting an error and I am not sure what I am missing. Any help is
great appreciated.

Johnnie


Johnnie[_2_]

Array Function?
 
Thanks everyone. One simple little open paren.

"Johnnie" wrote:

A B C
1 Company 1 10 Company 1
2 Company 2 10
3 Company 3 10
4 Company 2 8
5 Company 1 7
6 Company 1 6
7 Company 3 8

In C2 I am using this function =sumproduct(--$a$1:$a$7="Company 1"),b1:b7)
I keep getting an error and I am not sure what I am missing. Any help is
great appreciated.

Johnnie



All times are GMT +1. The time now is 05:38 PM.

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