I’m trying to write a formula to sum multiple criteria using an array, but I want to have the criteria in one cell. Normally, the criteria within the array are manually entered, but I want to be able to make it dynamic so that I could have 3 colour or however many I want to add together. I don’t want to put them in separate cells as the spreadsheet would explode in the number of columns required.
Example: Sums together both Blue and Yellow.
{ =sum(sumifs($a$1:$a$10,$b$1:$b$10,{“Blue”,”Yellow”}))}
Column a contains colours, column b contains numbers.
What I’d like to do is have one cell that contains the criteria of Blue, Yellow and have a formula that looks like this:
{=sum(sumifs($a$1:$a$10,$b$1:$b$10,{c1}))} where c1 would be “Blue”, “Yellow”