1
votes

So I am working on a Google sheet and I need to pull the information out of 2 cells and make a singel criterion out them. This is what I am currently using. However, whenever I need a new value I need to manually change it.

=SUMIF('Count value example'!B4:B,"=Red Pen",'Count value example'!M4:M)

Would it be possible to have the citerion "Red Pen" be pulled from 2 cells within the sheets, lets say A2 and B2, A2 being "Red" and B2 being "Pen"? The sheet "Count value example" holds data that is organised with the parameter "Red Pen" in a single column as opposed to "Red" and "Pen" in 2 different columns

1

1 Answers

1
votes

Try,

=SUMIF('Count value example'!B4:B, TEXTJOIN(" ", true, A2:B2), 'Count value example'!M4:M)

enter image description here