跨多个列的COUNTIF公式
我正试图计算个人姓名在多个列中输入的次数。
例如,一个人可能在一个项目中是“客户经理”,但在另一个项目中是“项目经理”。我想计算这个人参与的项目的总数,不管他的角色是什么。下面是我开发的公式,但我得到了“#INVALID DATA TYPE”错误。
=COUNTIFS([Current Phase]:[Current Phase], [P's in MP]3, OR([Account Manager]:[Account Manager], [Design Manager]:[Design Manager]), [Calc Value]11)
谢谢!
岩石
评论
-
格雷格•盖茨 ✭✭✭✭✭
如果列彼此相邻,则可以在COUNTIF范围中指定多个列。你可以这样做:
=COUNTIF([客户经理]:[设计经理],"Rocky")
计算“Rocky”在“客户管理器”和“设计管理器”列之间的所有单元格中出现的次数。
如果你的列彼此不相邻,你必须把它分解成单独的语句,然后把它们加在一起:
=COUNTIF([客户经理]:[客户经理],“洛奇”)+ COUNTIF([项目经理]:[项目经理],“洛奇”)+…
我希望这对你有帮助!如果这对你不起作用,或者如果我误解了你的情况,请告诉我。
-
岩石阿诺德 ✭
Greg,谢谢你周到细致的回复!
列是相邻的,但由于某种原因,它返回了一个“无效”的响应,当我尝试你的第一个方法。
然而,我添加了“COUNTIFS”,效果非常好。
非常感谢你的帮助!
类别
Try this instead:<\/p>
=JOIN(COLLECT([Dash Columns]12:[Dash Columns]61, [Dash Columns]12:[Dash Columns]61, @cell <> \"\"), \", \")<\/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":[{"tagID":254,"urlcode":"Formulas","name":"Formulas"}]},{"discussionID":106627,"type":"question","name":"Automated due date for every Monday","excerpt":"I have several reports that I run. I have a SmartSheet that lists how often it runs (Daily, weekly or monthly). I have an equation that calculates the next due date based on the completion date. The completion date is automatically recorded when I complete the report. It works beautifully except for the times that weekly…","categoryID":322,"dateInserted":"2023-06-20T12:08:03+00:00","dateUpdated":null,"dateLastComment":"2023-06-20T13:15:59+00:00","insertUserID":120783,"insertUser":{"userID":120783,"name":"Lisa Vercellone","url":"https:\/\/community.smartsheet.com\/profile\/Lisa%20Vercellone","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-20T16:08:37+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":120783,"lastUser":{"userID":120783,"name":"Lisa Vercellone","url":"https:\/\/community.smartsheet.com\/profile\/Lisa%20Vercellone","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-20T16:08:37+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":25,"score":null,"hot":3374531042,"url":"https:\/\/community.smartsheet.com\/discussion\/106627\/automated-due-date-for-every-monday","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106627\/automated-due-date-for-every-monday","format":"Rich","lastPost":{"discussionID":106627,"commentID":381284,"name":"Re: Automated due date for every Monday","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381284#Comment_381284","dateInserted":"2023-06-20T13:15:59+00:00","insertUserID":120783,"insertUser":{"userID":120783,"name":"Lisa Vercellone","url":"https:\/\/community.smartsheet.com\/profile\/Lisa%20Vercellone","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-20T16:08:37+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,"image":{"url":"https:\/\/us.v-cdn.net\/6031209\/uploads\/7LJZYGRS3588\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-20T13:17:21+00:00","dateAnswered":"2023-06-20T12:22:38+00:00","acceptedAnswers":[{"commentID":381263,"body":"
Incorporate the below into your formula it will give you the Monday following the last completed date.<\/p>
=[Completed Date]@row - (WEEKDAY([Completed Date]@row) - 2)+7<\/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":[]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&siteSectionID=0&sort=-hot&limit=3&expand%5B0%5D=all&expand%5B1%5D=-body&expand%5B2%5D=insertUser&expand%5B3%5D=lastUser&status=accepted","prevURL":null,"currentPage":1,"total":10000,"limit":3},"title":"Trending Posts","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">