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
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!