HELP: What formula should I use?
I have a data set and one of the columns is a drop down where you can choose more than one option. I am using the Countifs formula because I have multiple owners and i am looking to capture the number of goods that owner has sold. Lets say the one column is Joe, Bill, Tim, Alice and the dropdown options are Apple, Banana, Orange, Grapes, Strawberry, Pears. The formula i am using is: Countifs([Owner]:[Owner], "Joe", [Fruit]:[Fruit], "Apple"). I did that for all the fruits, but i noticed that formula does not pick up the "Fruit" that are selected multiple times in the drop down. What formula do i need to use to capture the "fruit" that have been selected more than once in a particular row.
Answers
-
You would need to incorporate the HAS function.
=COUNTIFS(Owner:Owner, @cell = "Joe", Fruit:Fruit, HAS(@cell, "Apple"))
-
Do i do that for all fruits? Meaning do i put HAS(@cell, "Apple", "Banana", "Grape" and so forth?
-
No. Whether or not you need to include the other fruits will depend on exactly what you are trying to count.
-
I have a column and it is a drop down option, so more than one choice can be selected. I am looking to get the total number for all the fruit. What would that formula look like?
-
So you mean all selections made for "Joe"?
You would need this instead:
=COUNTM(COLLECT(Fruit:Fruit, Owner:Owner, @cell = "Joe"))
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.5K Get Help
- 448 Global Discussions
- 145 Industry Talk
- 481 Announcements
- 5.1K Ideas & Feature Requests
- 85 Brandfolder
- 152 Just for fun
- 73 Community Job Board
- 492 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 304 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!