sumif from an array

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

Hi,

Does anyone know how I can make this happen.

=sumif(B1:B10,OR('1','48A','3/2'),C1:10)

Where the OR bit is an array of random values. But I don't
think you can put an array in the conditions for sumif.
Does anyone know a better way to do it?

Please
 
Hi Jeff
one way: try
=SUMPRODUCT(((B1:B10="1")+(B1:B10="48A")+(B1:B10="3/2")),C1:C10)
 
=SUM(SUMIF(B1:B10,{"1","48A","3/2"},C1:C10))

Worked for me.

3/2 seems to match Mar 2, 2004 or the string 3/2, but not the number 3/2
(1.5)

"1" matches the number 1 or the string "1"
 

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

Back
Top