ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   sumif function (https://www.excelbanter.com/excel-worksheet-functions/26383-sumif-function.html)

Fred Lavallee

sumif function
 
Is it possible to =sumif(and(a1:a10,"hello",c1:c10),(left(d1:d10,2)= "AD")
somethin like this?

JE McGimpsey

One way:

=SUMPRODUCT(--(A1:A10="hello"),--(LEFT(D1:D10,2)="AD"),C1:C10)

For an explanation of the "--", see

http://www.mcgimpsey.com/excel/doubleneg.html



In article ,
"Fred Lavallee" <Fred wrote:

Is it possible to =sumif(and(a1:a10,"hello",c1:c10),(left(d1:d10,2)= "AD")
somethin like this?


bj

Try
=sumproduct(--(a1:a10="hello"),--(left(d1:d10,2)="AD"),c1:c10)

[the --( is to convert a logical true false to 1,0]

"Fred Lavallee" wrote:

Is it possible to =sumif(and(a1:a10,"hello",c1:c10),(left(d1:d10,2)= "AD")
somethin like this?


Alok

Use Sumproduct instead.
=Sumproduct(--(A1:A10="hello"),--(left(d1:d10,2)="AD"),(C1:C10))
Alok Joshi

"Fred Lavallee" wrote:

Is it possible to =sumif(and(a1:a10,"hello",c1:c10),(left(d1:d10,2)= "AD")
somethin like this?


Peo Sjoblom

No, but you can use SUMPRODUCT

=SUMPRODUCT(--(A1:A10="hello"),--(LEFT(D1:D10,2)="AD"),C1:C10)


Regards,

Peo Sjoblom

"Fred Lavallee" wrote:

Is it possible to =sumif(and(a1:a10,"hello",c1:c10),(left(d1:d10,2)= "AD")
somethin like this?



All times are GMT +1. The time now is 02:09 AM.

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