ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   SUMIF & OR (https://www.excelbanter.com/excel-discussion-misc-queries/212153-sumif.html)

Neil Pearce

SUMIF & OR
 
Dear all,

I wish to use a SUMIF(range, criteria, sum range) forumula utlising OR for
the criteria, e.g.

=SUMIF(A1:J1,OR(A10:A20),B2:J2)

It would appear however that this does not work. Can you please point out
the error of my ways, thank-you.


Yours in appreciation (as always),

Neil

Bernard Liengme

SUMIF & OR
 
Can you tell us in words what you want?
Is it: to sum B values when corresponding A value matches anything in
A10:A20?
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Neil Pearce" wrote in message
...
Dear all,

I wish to use a SUMIF(range, criteria, sum range) forumula utlising OR for
the criteria, e.g.

=SUMIF(A1:J1,OR(A10:A20),B2:J2)

It would appear however that this does not work. Can you please point out
the error of my ways, thank-you.


Yours in appreciation (as always),

Neil




vezerid

SUMIF & OR
 
Use:

=SUMPRODUCT(SUMIF(A1:J1,A10:A20,A2:J2)

HTH
Kostis Vezerides

On 2 , 14:38, Neil Pearce wrote:
Dear all,

I wish to use a SUMIF(range, criteria, sum range) forumula utlising OR for
the criteria, e.g.

=SUMIF(A1:J1,OR(A10:A20),B2:J2)

It would appear however that this does not work. *Can you please point out
the error of my ways, thank-you.

Yours in appreciation (as always),

Neil



vezerid

SUMIF & OR
 
Oops, one more parenthesis in the end:

=SUMPRODUCT(SUMIF(A1:J1,A10:A20,A2:J2))

HTH
Kostis

On 2 Δεκ, 14:57, vezerid wrote:
Use:

=SUMPRODUCT(SUMIF(A1:J1,A10:A20,A2:J2)

HTH
Kostis Vezerides

On 2 Äåê, 14:38, Neil Pearce wrote:



Dear all,


I wish to use a SUMIF(range, criteria, sum range) forumula utlising OR for
the criteria, e.g.


=SUMIF(A1:J1,OR(A10:A20),B2:J2)


It would appear however that this does not work. *Can you please point out
the error of my ways, thank-you.


Yours in appreciation (as always),


Neil- Απόκρυψη κειμ*νου σε παράθεση -


- Εμφάνιση κειμ*νου σε παράθεση -



Neil Pearce

SUMIF & OR
 
Hi Bernard,

That is indeed the situation that I require solving.


Cheers,

Neil

"Bernard Liengme" wrote:

Can you tell us in words what you want?
Is it: to sum B values when corresponding A value matches anything in
A10:A20?
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Neil Pearce" wrote in message
...
Dear all,

I wish to use a SUMIF(range, criteria, sum range) forumula utlising OR for
the criteria, e.g.

=SUMIF(A1:J1,OR(A10:A20),B2:J2)

It would appear however that this does not work. Can you please point out
the error of my ways, thank-you.


Yours in appreciation (as always),

Neil





Bernard Liengme

SUMIF & OR
 
I think this is what you want
=SUMPRODUCT(--(A1:J1=TRANSPOSE(A10:A20)),A2:J2)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Neil Pearce" wrote in message
...
Hi Bernard,

That is indeed the situation that I require solving.


Cheers,

Neil

"Bernard Liengme" wrote:

Can you tell us in words what you want?
Is it: to sum B values when corresponding A value matches anything in
A10:A20?
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Neil Pearce" wrote in message
...
Dear all,

I wish to use a SUMIF(range, criteria, sum range) forumula utlising OR
for
the criteria, e.g.

=SUMIF(A1:J1,OR(A10:A20),B2:J2)

It would appear however that this does not work. Can you please point
out
the error of my ways, thank-you.


Yours in appreciation (as always),

Neil







Bernard Liengme

SUMIF & OR
 
I was too quick to hit Send:
1) this is an array formula and needs CTRL+SHIFT+ENTER
2) the vector A10:20 has 11 elements while A1:J1 and A2:J2 have only 10 each
so use =SUMPRODUCT(--(A1:J1=TRANSPOSE(A10:A19)),A2:J2)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Bernard Liengme" wrote in message
...
I think this is what you want
=SUMPRODUCT(--(A1:J1=TRANSPOSE(A10:A20)),A2:J2)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Neil Pearce" wrote in message
...
Hi Bernard,

That is indeed the situation that I require solving.


Cheers,

Neil

"Bernard Liengme" wrote:

Can you tell us in words what you want?
Is it: to sum B values when corresponding A value matches anything in
A10:A20?
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Neil Pearce" wrote in message
...
Dear all,

I wish to use a SUMIF(range, criteria, sum range) forumula utlising OR
for
the criteria, e.g.

=SUMIF(A1:J1,OR(A10:A20),B2:J2)

It would appear however that this does not work. Can you please point
out
the error of my ways, thank-you.


Yours in appreciation (as always),

Neil









All times are GMT +1. The time now is 03:54 PM.

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