Countifs Name reference
We are working on a formula where we are needing the counts of two names in a column. So if the range column we are pulling from has both John Doe and Jane-Marie Doe, we want the count of how many times that occurs.
This is the formula we have and it is not working:
=COUNTIFS([{A Great Place to Work Range 4}]:[{A Great Place to Work Range 4}], "John Doe", {A Great Place to Work Range 4}:{A Great Place to Work Range 4}, "Jane-Marie Doe"))
We are also trying to do the same thing, but with only one name and it is not working:
=COUNTIFS([{A Great Place to Work Range 4}]:[{A Great Place to Work Range 4}], "John Doe"))
Best Answer
-
Paul Newcome ✭✭✭✭✭✭
Ok. So we want to FIND "John Doe" and FIND "Jane-Marie Doe" but we only want to count if those two are the only two in the cell.
FIND("John Doe", @cell) > 0
FIND("Jane-Marie Doe", @cell) > 0
LEN(@cell) = 23
The LEN function ensures that it will not count cells that have both names as well as additional names in it.
=条件统计({伟大工作场所范围4}, AND(FIND("John Doe", @cell) > 0, FIND("Jane-Marie Doe", @cell) > 0, LEN(@cell) = 23))
thinkspi.com
Answers
-
Maria Watters ✭✭✭✭✭
We are getting the unparseable error
-
Paul Newcome ✭✭✭✭✭✭
There are a few issues with the above...
When you are creating cross sheet references, you do not use square brackets, and you do not double it up with the colon to reflect a column (or range of columns). If you want to reference the entire column called "Name", then you would select the column header for the Name column from the other sheet when creating the reference, and it would appear inside of curly brackets. That is the range for the formula.
=COUNTIFS({A Great Place to Work Range 4}, "John Doe",{A Great Place to Work Range 4}, "Jane-Marie Doe"))
You also have one too many closing parenthesis at the end of your formula.
=条件统计({伟大工作场所范围4}, "John Doe", {A Great Place to Work Range 4}, "Jane-MarieDoe")
另外,你的公式是目前说count if the cell EQUALS "John Doe" AND EQUALS "Jane-Marie Doe". A cell cannot equal two different values at the same time. To correct this, we would need to establish EXACTLY what you are trying to count.
Is it ONLY if it contains BOTH names or is it if it contains at least one of those names? Do you want to also count if it contains other names in addition to the previous?
Which rows would you want counted and why?
- John Doe
- Jane-Marie Doe
- John Doe, Jane-Marie Doe
- John Doe, John Smith
- Jane-Marie Doe, Jane Smith
- John Doe, Jane-Marie Doe, John Smith
thinkspi.com
-
Maria Watters ✭✭✭✭✭
So the row we are counting, there is the ability to select multiple people within that cell that is why we are wanting to see John Doe AND Jane-Marie Doe (or just Jane Doe for simplicity).
We are wanting to know how many projects they are working on together.
-
Paul Newcome ✭✭✭✭✭✭
-
Maria Watters ✭✭✭✭✭
It would be #3
-
Paul Newcome ✭✭✭✭✭✭
-
Maria Watters ✭✭✭✭✭
It is indeed a contact field.
-
Paul Newcome ✭✭✭✭✭✭
Ok. So we want to FIND "John Doe" and FIND "Jane-Marie Doe" but we only want to count if those two are the only two in the cell.
FIND("John Doe", @cell) > 0
FIND("Jane-Marie Doe", @cell) > 0
LEN(@cell) = 23
The LEN function ensures that it will not count cells that have both names as well as additional names in it.
=条件统计({伟大工作场所范围4}, AND(FIND("John Doe", @cell) > 0, FIND("Jane-Marie Doe", @cell) > 0, LEN(@cell) = 23))
thinkspi.com
Help Article Resources
Categories
Check out theFormula Handbook template!
=INDEX({Data SHPType}, MATCH(Course@row, {Data Course}, 0<\/strong>))<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]},{"discussionID":106455,"type":"question","name":"Formula to count items in a cell separated by a semicolon","excerpt":"Good afternoon, could someone help me with a formula to count items in a cell separated by a semicolon and put the total in another? I have a column called: \"MRA Actives codes\", in which there are different medical codes separated by a semicolon, for example: I70.0: Atherosclerosis of aorta; I50.9: Heart failure…","categoryID":322,"dateInserted":"2023-06-14T19:20:24+00:00","dateUpdated":null,"dateLastComment":"2023-06-15T11:46:15+00:00","insertUserID":162381,"insertUser":{"userID":162381,"name":"VirginiaLazor","title":"Medical Risk Adjustment Auditor","url":"https:\/\/community.smartsheet.com\/profile\/VirginiaLazor","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!b1Dom3_UQfo!xekpcXON8bo!9w33zAjZR8S","dateLastActive":"2023-06-15T12:10:22+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":45516,"lastUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-06-15T12:21:12+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":6,"countViews":39,"score":null,"hot":3373603599,"url":"https:\/\/community.smartsheet.com\/discussion\/106455\/formula-to-count-items-in-a-cell-separated-by-a-semicolon","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106455\/formula-to-count-items-in-a-cell-separated-by-a-semicolon","format":"Rich","lastPost":{"discussionID":106455,"commentID":380725,"name":"Re: Formula to count items in a cell separated by a semicolon","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/380725#Comment_380725","dateInserted":"2023-06-15T11:46:15+00:00","insertUserID":45516,"insertUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-06-15T12:21:12+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-15T12:03:29+00:00","dateAnswered":"2023-06-15T11:44:52+00:00","acceptedAnswers":[{"commentID":380724,"body":"