Counting 2 different Columns?
I am in need of some help. I can't seem to figure out how I am to get a count of how many people selected a certain salad with a certain protein. I have one column that participants are picking a lunch item. Two of those items are salads. I put the formula =COUNTIF([Sunday, January 23rd Lunch]:[Sunday, January 23rd Lunch], CONTAINS("Winter grains", @cell)) to know how many people selected the Winter Grains Salad. That works. Then they also selected a protein to go with the salad. I am needing to know how many people that selected the Winter Grains Salad wanted Salmon with their salad. So for instance, 4 people selected Winter Grain Salad I am needing to know out of those 4 who chose salmon for their protein. I tried combining the formulas together but I am getting an error response in the cell.
Best Answer
-
If so then you can use the COUNTIFS function.
=COUNTIFS([Sunday, January 23rd Lunch]:[Sunday, January 23rd Lunch], CONTAINS("Winter grains", @cell),[Salad Protein Option]:[Salad Protein Option],CONTAINS("Salmon", @cell))
Answers
-
See below how you can use the AND function to do this.
=COUNTIF([Sunday, January 23rd Lunch]:[Sunday, January 23rd Lunch], and(CONTAINS("Winter grains", @cell),CONTAINS("Salmon", @cell)))
-
The Salmon is in a different Column Labeled Salad Protein Option so this equation works but not for to provide the result I am looking for.
-
If so then you can use the COUNTIFS function.
=COUNTIFS([Sunday, January 23rd Lunch]:[Sunday, January 23rd Lunch], CONTAINS("Winter grains", @cell),[Salad Protein Option]:[Salad Protein Option],CONTAINS("Salmon", @cell))
-
Thank you! It works!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.9K Get Help
- 429 Global Discussions
- 147 Industry Talk
- 486 Announcements
- 5.2K Ideas & Feature Requests
- 86 Brandfolder
- 151 Just for fun
- 74 Community Job Board
- 498 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 305 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!