Rectify function - combination of Sumproduct and OR

H

Hilton

Hi,

1) how can I combine Sumproduct and the OR function?
eg

av Bank1 1
av Bank2 2
av Bank3 3
av LADD 4
av LCH 3
av MSL 2


=SUMPRODUCT(($B$19:$B$24="av")*OR(($C$19:$C$24<>"Bank1"),($C$19:$C$24<>"Bank
2"),($C$19:$C$24<>"Bank3"))*($D$19:$D$24))
returns 15


but I want it to pick up only LADD, LCH & MSL
i.e return 9!



2) can one use wildcard characters?
eg if there is a Bank4 and Bank5 in the list
 
P

Pete_UK

Try it like this:

=SUMPRODUCT(($B$19:$B$24="av")*(LEFT($C$19:$C$24,4)<>"Bank")*($D$19:$D
$24))

Hope this helps.

Pete
 
T

Terry Bennett

Hilton

Try:

=SUMPRODUCT(($B$19:$B$24="av")*($C$19:$C$24<>"Bank1")*($C$19:$C$24<>"Bank2")*($C$19:$C$24<>"Bank3"),($D$19:$D$24))

Not sure about wildcards - I'll let somebody else respond on that.

Terry
 
B

Bernd P

Hello,

I suggest
=SUMPRODUCT(--($B$19:$B$24="av"),SIGN(($C$19:$C$24="LADD") + ($C$19:$C
$24="LCH") + ($C$19:$C$24="MSL")),$D$19:$D$24)

Regards,
Bernd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top