COUNTIF Formula
Hello!
I am trying to set up a formula in my sheet summary that counts a cell if it includes one of three names. So far I have tried the following but am either getting 0 or an error message..
=COUNTIFS(OR(FIND("Name1", [ASSIGNED PREFAB POC]:[ASSIGNED PREFAB POC]), FIND("Name2", [ASSIGNED PREFAB POC]:[ASSIGNED PREFAB POC]), FIND("Name3", [ASSIGNED PREFAB POC]:[ASSIGNED PREFAB POC])))
=COUNTIF([ASSIGNED PREFAB POC]:[ASSIGNED PREFAB POC], "Name1") + COUNTIF([ASSIGNED PREFAB POC]:[ASSIGNED PREFAB POC], "Name2") + COUNTIF([ASSIGNED PREFAB POC]:[ASSIGNED PREFAB POC], "Name3")
I do not want to count any cells more than once.
Please help!
Best Answer
-
That is why... This should help:
- COUNTIF([ASSIGNED PREFAB POC]:[ASSIGNED PREFAB POC], FIND("Name1",@cell)>0)+COUNTIF([ASSIGNED PREFAB POC]:[ASSIGNED PREFAB POC], FIND("Name2",@cell)>0)+COUNTIF([ASSIGNED PREFAB POC]:[ASSIGNED PREFAB POC], FIND("Name3",@cell)>0)
Your names will have to appear exactly as they do in the contact column (which could also be their email address).
I hope this helps!
Best,
Zach Hall
Training Delivery Manager / Charter Communications
Answers
-
Do the cells that contain the names have multiple names in them? If so, are they contact cells or just normal text in a string format?
Best,
Zach Hall
Training Delivery Manager / Charter Communications
-
Yes. It is a contact list column. Some cells have one name, some have two, some have three.
-
That is why... This should help:
- COUNTIF([ASSIGNED PREFAB POC]:[ASSIGNED PREFAB POC], FIND("Name1",@cell)>0)+COUNTIF([ASSIGNED PREFAB POC]:[ASSIGNED PREFAB POC], FIND("Name2",@cell)>0)+COUNTIF([ASSIGNED PREFAB POC]:[ASSIGNED PREFAB POC], FIND("Name3",@cell)>0)
Your names will have to appear exactly as they do in the contact column (which could also be their email address).
I hope this helps!
Best,
Zach Hall
Training Delivery Manager / Charter Communications
-
It worked. Thank you!
Will this @cell in the formula mess up any cell links in the sheet?
-
Nope! You should be good to go :)
Best,
Zach Hall
Training Delivery Manager / Charter Communications
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.9K Get Help
- 379 Global Discussions
- 210 Industry Talk
- 441 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 300 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!