I need to sum a range of values in Excel based on one criterion.
So I want to sum say range B1:B10
based on values of range A1:A10
if the range A1:A10
answers to some criterion e.g. contains the words "apple - juice fresh"
or "banana"
So the formula would look like :
=SUMPRODUCT(SUMIF(A1:A10;{"apple - juice fresh";"banana"};B1:B10))
This works as desired. Now, I don't want to have the list hardcoded in the formula. I want the list somewhere in a cell. Say cell C1
. And so the cell C1
contains as a value :
{"apple - juice fresh";"banana"}
and I want the formula to be something like :
=SUMPRODUCT(SUMIF(A1:A10;C1;B1:B10))
But this does not work. How can I achieve this ? I tried CONCATENATE(C1)
but it does not work.
Herebelow is a sample of what I would like
FILTERXML()
to break down the list into seperate elements. If you go this way, I'd stick to a single delimiter without the opening and closing brackets or the quotes. Another option usingISNUMBER()
andFIND()
combinations. Do you have a little bit of sample data to work with? Including your desired results. – JvdVSUMPRODUCT()
so assume you won't have access to the new dynamic arrays? – JvdVSUMPRODUCT()
forNon 365
version. – Harun24HR