How to create a list of values in a cell to be treated by sumifS()?

Hi,

Is it possible to treat a list of key values inside a cell that sumifS() formula will do iteration for each element ?
For example I have a list of keys (“A” , “B” , “C”) then sumifS() will treat A then B then add both result and continues with C and so on.
I have a huge table with a sring of search keys in each cell and it will take time to split manually each cell in several lines.

Thanks

Screenshot_20241011_105106

SUMIFS supports regular expressions → you may simply do

=SUMIFS(B$2:B$6;A$2:A$6;"A|B|C")

Just make sure to enable regular expressions in the calculation options.

1 Like

The list is a string in a hundred of cell then I can not type it directly in the formula.

=SUMIFS(B$2:B$6;A$2:A$6;TEXTJOIN("|";1;<RANGE_WITH_SEARCH_VALUES>))

This doesnt work. Look both pics. One is shows formula.


… and did you enable regular expressions?

It works now. I activate regular expressions option. Thank you.

Another approach:
ask112449.ods (22.1 KB)

1 Like