为什么我的COUNTIF公式不会从源表中计算任何东西?

你好,

我目前有三个电子表格的系统:1)打开/关闭操作的主列表,提供2)打开操作表,3)关闭操作表。前两张表格的公式非常适用,但是,当涉及到第三张表格(Closed Actions)时,我的COUNTIFS公式将不会计算其中任何内容。我尝试了几个公式来试图理解这个问题的原因,但都不起作用。下面我附上了我的问题的一个例子,以及我正在使用的公式:


image.png

=COUNTIFS({date_closed}, IFERROR(YEAR(@cell), 0) = 2020, {date_closed}, IFERROR(MONTH(@cell), 0) = 1)


提前谢谢!

卡罗莱纳

最佳答案

答案

  • I copied your formula directly into a few of my test sheets, updated the reference, and it worked just fine. My only thought is that the reference sheet might be stale or broken, or could be copied over from something else. I would start the formula over, remake the reference under a slightly different name (something like date_closed1) and see if it reacts any differently.<\/p>","bodyRaw":"[{\"insert\":\"I copied your formula directly into a few of my test sheets, updated the reference, and it worked just fine. My only thought is that the reference sheet might be stale or broken, or could be copied over from something else. I would start the formula over, remake the reference under a slightly different name (something like date_closed1) and see if it reacts any differently.\\n\"}]","format":"rich","dateInserted":"2020-09-14T12:49:36+00:00","insertUser":{"userID":120260,"name":"David Tutwiler","title":"","url":"https:\/\/community.smartsheet.com\/profile\/David%20Tutwiler","photoUrl":"https:\/\/lh3.googleusercontent.com\/a-\/AOh14GiIpuCpV7Zvo9nduJmLt8ULNYObTVazzemdnIiy6w=s96-c","dateLastActive":"2022-12-23T22:57:53+00:00","banned":0,"punished":0,"private":false,"label":"Overachievers"},"displayOptions":{"showUserLabel":false,"showCompactUserInfo":true,"showDiscussionLink":false,"showPostLink":false,"showCategoryLink":false,"renderFullContent":false,"expandByDefault":false},"url":"https:\/\/community.smartsheet.com\/discussion\/comment\/262710#Comment_262710","embedType":"quote"}"> https://community.smartsheet.com/discussion/comment/262710#Comment_262710

    谢谢你大卫!

    我认为最好是将数据复制到一个新的工作表中并更新公式,这在某种程度上解决了问题。

  • 有趣。很高兴你把它修好了。

  • Marc Roussel
    Marc Roussel ✭✭✭✭✭✭

    问候,


    我在参数制作中遇到过类似的情况。ob欧宝娱乐app手机下载在某些情况下COUNTIFS给我一个值,如果我使用COUNT(COLLECT)并应用相同的标准,我得到另一个值,通常是+1从COUNTIFS。当我检查源数据时,COUNT(COLLECT)产生正确的计数,但COUNTIFS没有。我搞不清楚,因为这种事不常发生。我找不到韵律或理由。我决定使用COUNT(COLLECT(…向前发展。


    最好的问候,

    Marc Roussel

帮助文章资源欧宝体育app官方888

想直接在Smartsheet中练习使用公式吗?

请查看公式手册模板!
@toni.toni601<\/a> <\/p>

You have to right-click on a task's bar. You cannot do it on a parent row's bar.<\/p>

Yes:<\/p>

\n
\n \n \"image.png\"<\/img><\/a>\n <\/div>\n<\/div>\n

No:<\/p>

\n
\n \n \"image.png\"<\/img><\/a>\n <\/div>\n<\/div>\n


<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-12-28 21:37:14","updateUser":{"userID":155504,"name":"toni.toni601","url":"https:\/\/community.smartsheet.com\/profile\/toni.toni601","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-12-28T21:37:17+00:00","banned":0,"punished":0,"private":false,"label":"✭"}}},"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":99100,"type":"question","name":"SUMIF Children","excerpt":"I am building out my project plan. I need to track % complete per project phase. How do I add up the % complete of the children in each phase? I could use help with the formula.","categoryID":322,"dateInserted":"2022-12-28T16:24:59+00:00","dateUpdated":null,"dateLastComment":"2022-12-28T17:59:16+00:00","insertUserID":156313,"insertUser":{"userID":156313,"name":"cbadaracco","url":"https:\/\/community.smartsheet.com\/profile\/cbadaracco","photoUrl":"https:\/\/lh3.googleusercontent.com\/a-\/AOh14GiYtw5L2lY14lMk1VvDgDn0Jo68C7dzWjCHwkUElg=s96-c","dateLastActive":"2022-12-28T17:58:50+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":156313,"lastUser":{"userID":156313,"name":"cbadaracco","url":"https:\/\/community.smartsheet.com\/profile\/cbadaracco","photoUrl":"https:\/\/lh3.googleusercontent.com\/a-\/AOh14GiYtw5L2lY14lMk1VvDgDn0Jo68C7dzWjCHwkUElg=s96-c","dateLastActive":"2022-12-28T17:58:50+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":11,"score":null,"hot":3344496255,"url":"https:\/\/community.smartsheet.com\/discussion\/99100\/sumif-children","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/99100\/sumif-children","format":"Rich","lastPost":{"discussionID":99100,"commentID":355436,"name":"Re: SUMIF Children","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/355436#Comment_355436","dateInserted":"2022-12-28T17:59:16+00:00","insertUserID":156313,"insertUser":{"userID":156313,"name":"cbadaracco","url":"https:\/\/community.smartsheet.com\/profile\/cbadaracco","photoUrl":"https:\/\/lh3.googleusercontent.com\/a-\/AOh14GiYtw5L2lY14lMk1VvDgDn0Jo68C7dzWjCHwkUElg=s96-c","dateLastActive":"2022-12-28T17:58:50+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":"2022-12-28T17:58:44+00:00","dateAnswered":"2022-12-28T17:11:57+00:00","acceptedAnswers":[{"commentID":355429,"body":"

@cbadaracco<\/a> <\/p>

You have a few options on how to get the results you are looking for:<\/p>

Option #1: If you use one of the Smrtsheet Project templates, this value will be calculated automatically.<\/p>

Option #2: You can use the following formula:<\/p>

IFERROR(AVG(COLLECT(CHILDREN(), CHILDREN(Status@row<\/a>), \"Complete\")), 0)<\/p>

I hope this helps.<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-12-28 17:58:44","updateUser":{"userID":156313,"name":"cbadaracco","url":"https:\/\/community.smartsheet.com\/profile\/cbadaracco","photoUrl":"https:\/\/lh3.googleusercontent.com\/a-\/AOh14GiYtw5L2lY14lMk1VvDgDn0Jo68C7dzWjCHwkUElg=s96-c","dateLastActive":"2022-12-28T17:58:50+00:00","banned":0,"punished":0,"private":false,"label":"✭"}}},"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":99099,"type":"question","name":"Need Help with multiple IF statements within a formula","excerpt":"Attempting to update a status column to show either Not Started, In Progress, or Complete based on blank or not blank statements from other columns. These formulas work by them selves. =IF(COLUMN1@row = \"//www.santa-greenland.com/community/discussion/71254/\", \"Not Started\", \"In Progress\") =IF([COLUMN 10]@row <> \"//www.santa-greenland.com/community/discussion/71254/\", \"Complete\") but put together and they don't. I get the…","categoryID":322,"dateInserted":"2022-12-28T16:21:01+00:00","dateUpdated":null,"dateLastComment":"2022-12-28T17:28:04+00:00","insertUserID":156312,"insertUser":{"userID":156312,"name":"MannyDLC","url":"https:\/\/community.smartsheet.com\/profile\/MannyDLC","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!goksJzeDOrs!g9du30IIhbM!Ce7Lkn_vLG_","dateLastActive":"2022-12-28T17:58:52+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":132999,"lastUser":{"userID":132999,"name":"Frank S.","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Frank%20S.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/6E46CR0FPMOK\/n4Q8ROUTCGN5X.jpg","dateLastActive":"2022-12-28T17:28:20+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":25,"score":null,"hot":3344494745,"url":"https:\/\/community.smartsheet.com\/discussion\/99099\/need-help-with-multiple-if-statements-within-a-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/99099\/need-help-with-multiple-if-statements-within-a-formula","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":99099,"commentID":355433,"name":"Re: Need Help with multiple IF statements within a formula","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/355433#Comment_355433","dateInserted":"2022-12-28T17:28:04+00:00","insertUserID":132999,"insertUser":{"userID":132999,"name":"Frank S.","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Frank%20S.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/6E46CR0FPMOK\/n4Q8ROUTCGN5X.jpg","dateLastActive":"2022-12-28T17:28:20+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":"2022-12-28T17:27:48+00:00","dateAnswered":"2022-12-28T17:19:17+00:00","acceptedAnswers":[{"commentID":355430,"body":"

Hi @MannyDLC<\/a> ,<\/p>

If you want to have multiple If statements, you'll need to nest them inside one another.<\/p>

For these two statements I would suggest the following:<\/p>

=IF([COLUMN1]@row = \"//www.santa-greenland.com/community/discussion/71254/\", \"Not Started\", IF([COLUMN 10]@row <> \"//www.santa-greenland.com/community/discussion/71254/\", \"Complete\", \"In Progress\"))<\/p>

I would also suggest that you use values in the expression portion of the if statement. Perhaps a percentage.<\/p>

=IF([COLUMN1]@row = 0, \"Not Started\", IF([COLUMN1]@row = 100, \"Complete\", \"In Progress\"))<\/p>

This formula is basically saying, <\/p>

If column one is equal to zero, then show \"Not Started\", otherwise if it is equal to 100, show \"Complete\", otherwise if non of those conditions are met, then show \"In Progress\".<\/p>


<\/p>

Hope this helps!<\/p>"},{"commentID":355432,"body":"

@MannyDLC<\/a> <\/p>

The way to nest IF statements really varies with the data involved. Then it boils down to the logic underneath it all. <\/p>

In this case, I would start with [COLUMN 10]. The logic says \"if there's a value in COLUMN 10, set the status to \"Complete\". Easy enough. But what happens if there's no value in Column 10? In that case, you want to take a look at what's in COLUMN1, yes? So the IF statement you have for COLUMN1 becomes nested as the negative condition in the logic for COLUMN10:<\/p>

=IF(<\/strong>[COLUMN 10]@row <> \"//www.santa-greenland.com/community/discussion/71254/\", \"Complete\", IF(COLUMN1@row = \"//www.santa-greenland.com/community/discussion/71254/\", \"Not Started\", \"In Progress\"))<\/strong><\/p>

English: If there's a value in COLUMN 10, set the status to \"Complete\", otherwise, check the value in COLUMN1; if COLUMN1 is blank, set the status to \"Not Started\", otherwise, set the status to \"In Progress\".<\/p>