I want to create a switch for one of my criteria in a countifs-formula, using a dropdown list. For example:
I want to count all the companies that match criterion 1 (area), and then have a second criterion, size, whose value I can change using a dropdown list, and which can be set to "small", "big" or "both". The "both" part is where I can't figure out what to do.
With "limit values" on a cell (D1) that only allows 1 ("small") and 2 ("big"), and a reference to that cell, the first part is easy:
=countifs(A1:A10,"Munich",B1:B10,"="&D1)
What I'm wondering is what I would have to put into D1 that tells the function to count "all". Normally, you would simply use "<>" instead of "="&"..." to count all the non empty cells, but that's not an an option here. I tried putting * in D1 as well as ="*", but he won't recognize that (I gues due to the values being numbers and not text). I'm stuck.
Thanks for your help.
Edit: For completenes' sake: I just tried to use the formula on a criterion where the data is text, not numbers, and in this case using an asterisk * works just fine. So if the column has "big" and "small" instead of "1" and "2" for values, and you put * into D1, it counts all non empty cells. Hooray :)