条件求和麻烦

TJ-Webfoot
编辑12/09/19 公式和函数

我觉得我就快明白了,但就是想不明白。我试图确定一个销售率(钱/小时)每个估计,每月(日期范围)。

我的专栏标题是:运营开始日期,估算,范围人力资源和合同金额。

我认为问题是在SUMIFS公式中使用日期范围。我知道它可能在excel中,就像我有它下面,但不是在SS。有没有人有一个建议的解决方案?

=SUMIFS(合同金额:合同金额,运营开始日期:运营开始日期,“>=”&DATE(2018,1,1),运营开始日期:运营开始日期,“<”&DATE(2018,1,31),估算人员:估算人员,“Nathan”)

评论

  • 迈克Wilday
    迈克Wilday ✭✭✭✭✭✭

    是啊,看起来你的约会项目是个问题。试着去掉&符号和引号。此外,带有空格的列名应该用括号括起来,像这样:[合同金额]:[合同金额]

    我看到的另一件成功的事情是将单独的sum-if语句加在一起。=sumif(范围,标准)+sumif(范围,标准)+sumif(范围标准)将给你相同的结果,但是一个更长的公式。

    单独测试每个和,以确保你得到结果。然后可以用加号将它们连接起来。希望有帮助!

  • 我想明白了。花了一些巨大的努力和一些极好的帮助莱克斯在支持团队。基本上“SUMIFS”不适用于日期范围。解决这个问题的方法是使用IF语句和MONTH语法一起添加一个列和公式;它查看日期(1/1/2018格式)并将其转换为月份。为了避免“#无效数据类型”错误,(这需要大量的故障排除)你必须把ISBLANK语法放在公式的开头,并为假语句加上引号,但只是在第一个嵌套变量中……(不要忘记确保你在结尾有足够的括号!)

    =IF(ISBLANK([Ops开始日期]162)," ",IF(MONTH([Ops开始日期]162)= 1,"一月",IF(MONTH([Ops开始日期]162)= 2,"二月",IF(MONTH([Ops开始日期]162)= 3,"三月",IF(MONTH([Ops开始日期]162)= 4,"四月",IF(MONTH([Ops开始日期]162)= 5,"五月",IF(MONTH([Ops开始日期]162)= 6,"六月",IF(MONTH([Ops开始日期]162)= 7,"七月",IF(MONTH([Ops开始日期]162)= 9,"九月",IF(MONTH([Ops开始日期]162)= 10,"十月",IF(MONTH([Ops Start Date]162) = 11, "十一月",IF(MONTH([Ops Start Date]162) = 12, "十二月")))))))))))))

  • 一旦我确定了日期问题,我便能够通过使用以下公式获得总金额(合同金额):

    =SUMIFS([合同金额]:[合同金额],月份:月份,“一月”,估算人员:估算人员,“Nathan”)

    为了获得时间:

    =SUMIFS([Scope Hr]:[Scope Hr],月份:月份,"一月",估算员:估算员,"Nathan")

    然后,在另一列中有一个简单的公式,用于将得到的小时数除以美元,以获得特定估算器当月的销售率。

    现在我只需要外推12个月乘以5个估计值。耶!

  • 迈克Wilday
    迈克Wilday ✭✭✭✭✭✭

    嘿,谢谢你分享解决方案。

    我学到的一个关于右括号的特殊技巧…如果你去掉所有最后的右括号。Smartsheet会帮你全部关闭。

  • 你好TJ,

    谢谢你的问题。这听起来像你能够找到一个解决方案,可能为你工作,但我想澄清一些事情,我已经注意到,而通过阅读这条线。Mike关于列名中空格需要用方括号括起来[]的说法是正确的,但是需要注意的是,包含数字或特殊字符的列名也需要用方括号括起来。更多参考资料请参阅此处(https://help.smartsheet.com/articles/2476171引用)

    我想指出的更重要的事情是,SUMIFS公式可以处理日期范围,而您的原始公式在如何做到这一点上非常接近。下面是这个公式的一个例子:

    =SUMIFS([合同金额]:[合同金额],[运营开始日期]:[运营开始日期],>= Date(2018, 1,1),[运营开始日期]:[运营开始日期],<= Date(2018, 1,31),估算者:估算者,“Nathan”)

    您也可以将此公式用于范围Hr列,将[合同金额]:[合同金额]替换为[范围Hr]:[范围Hr]。如果你想让每一个结果在各自的单元格中显示,然后在另一个单元格中用得到的美元除以得到的小时数,你可以像你在上一篇文章中所说的那样做。如果你更喜欢在一个单元格中完成所有这些,你可以将这些公式组合成一个类似的公式:

    =SUMIFS([合同金额]:[合同金额],[运营开始日期]:[运营开始日期],>= Date(2018,1,1),[运营开始日期]:[运营开始日期],<= Date(2018,1,31),估算者:估算者,“Nathan”)/ SUMIFS([范围Hr]:[范围Hr],[运营开始日期]:[运营开始日期],>= Date(2018,1,1),[运营开始日期]:[运营开始日期],<= Date(2018,1,31),估算者:估算者,“Nathan”)

    我想要注意的最后一件事是Mike将单独的sum-if语句添加到一起的解决方案。这将导致一个与你期望的结果不同的结果。这个选项更像是一个OR语句,并且看起来您正在寻找一个and语句,因为您只想要匹配所有条件的行求和。如果您希望公式对匹配任何条件而不是所有条件的行求和,则此选项非常有用。

  • 迈克Wilday
    迈克Wilday ✭✭✭✭✭✭

    谢谢你的澄清,罗伯特。

  • 这个公式是否适用于{Reference Sheets}?

帮助文章参考资料欧宝体育app官方888

想要直接在智能表中练习使用公式吗?

请查看公式手册模板!
TODAY(), Fleet:Fleet, \"A220\")","categoryID":322,"dateInserted":"2023-06-21T16:14:49+00:00","dateUpdated":null,"dateLastComment":"2023-06-21T20:20:41+00:00","insertUserID":162138,"insertUser":{"userID":162138,"name":"Louis.Smith","url":"https:\/\/community.smartsheet.com\/profile\/Louis.Smith","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-22T02:13:01+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":162138,"lastUser":{"userID":162138,"name":"Louis.Smith","url":"https:\/\/community.smartsheet.com\/profile\/Louis.Smith","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-22T02:13:01+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":40,"score":null,"hot":3374745330,"url":"https:\/\/community.smartsheet.com\/discussion\/106707\/how-to-count-how-many-interviews-in-the-current-week","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106707\/how-to-count-how-many-interviews-in-the-current-week","format":"Rich","lastPost":{"discussionID":106707,"commentID":381628,"name":"Re: How to count how many interviews in the current week?","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381628#Comment_381628","dateInserted":"2023-06-21T20:20:41+00:00","insertUserID":162138,"insertUser":{"userID":162138,"name":"Louis.Smith","url":"https:\/\/community.smartsheet.com\/profile\/Louis.Smith","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-22T02:13:01+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\/TNZRUD6K3A2N\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-21T20:21:04+00:00","dateAnswered":"2023-06-21T19:39:48+00:00","acceptedAnswers":[{"commentID":381601,"body":"

@Louis.Smith<\/a>,<\/p>

Awesome, glad it worked! Please remember to click the Answer button if you don't mind. <\/p>

Re: \"Is there a way to create a formula for the current?\" - By this do you mean for the current week?<\/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":106700,"type":"question","name":"If Or Formula Help","excerpt":"My formula is working in Excel, but not in Smartsheet. I am still fairly new to smartsheet so any help would be appreciated. Basically its looking at the GLAcct column and find certain values and creating key terms for those values. Ex: If GLAcct = 710111 or 710121, then show Key Salary.","categoryID":322,"dateInserted":"2023-06-21T15:12:46+00:00","dateUpdated":null,"dateLastComment":"2023-06-21T17:02:32+00:00","insertUserID":162062,"insertUser":{"userID":162062,"name":"mragans23","title":"Project Manager","url":"https:\/\/community.smartsheet.com\/profile\/mragans23","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-21T18:21:45+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":162062,"lastUser":{"userID":162062,"name":"mragans23","title":"Project Manager","url":"https:\/\/community.smartsheet.com\/profile\/mragans23","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-21T18:21:45+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":25,"score":null,"hot":3374728518,"url":"https:\/\/community.smartsheet.com\/discussion\/106700\/if-or-formula-help","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106700\/if-or-formula-help","format":"Rich","lastPost":{"discussionID":106700,"commentID":381545,"name":"Re: If Or Formula Help","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381545#Comment_381545","dateInserted":"2023-06-21T17:02:32+00:00","insertUserID":162062,"insertUser":{"userID":162062,"name":"mragans23","title":"Project Manager","url":"https:\/\/community.smartsheet.com\/profile\/mragans23","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-21T18:21:45+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\/WU7DXUC1MGJ2\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-21T18:54:42+00:00","dateAnswered":"2023-06-21T15:29:14+00:00","acceptedAnswers":[{"commentID":381516,"body":"

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

In Smartsheet you'd need to add @row to the GLAcct portion of your the formula. <\/p>

For example, the first section would be:<\/p>

=IF(OR(GLAcct@row = \"710111\", GLAcct@row = \"710121\"), \"Key Salary\")<\/p>

Once you've entered it for one row, you can then right click the cell and \"Convert to Column Formula\" to have it applied to all rows in the column. <\/p>

Other than that, I think everything should be OK once you add the @row in.<\/p>

Hope that helps; any questions etc. then just post! 😊<\/span><\/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":106682,"type":"question","name":"Make sum of one column in function of value of another","excerpt":"Hello everybody, I did not find my answer in the different discussions, then I hope you will be able to help me. I have a smart sheet with 2 columns: Part number Quantity I would like to count the total of parts with a certain number. Finally, it is an addition of the quantity when the P\/N is equal to a certain value. I…","categoryID":322,"dateInserted":"2023-06-21T06:31:14+00:00","dateUpdated":"2023-06-21T07:41:41+00:00","dateLastComment":"2023-06-21T11:14:19+00:00","insertUserID":159154,"insertUser":{"userID":159154,"name":"Guillaume B.","url":"https:\/\/community.smartsheet.com\/profile\/Guillaume%20B.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/S5NT3AR3967R\/nA4FRK2S3XJG9.jpg","dateLastActive":"2023-06-21T13:09:56+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":159154,"lastUserID":159154,"lastUser":{"userID":159154,"name":"Guillaume B.","url":"https:\/\/community.smartsheet.com\/profile\/Guillaume%20B.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/S5NT3AR3967R\/nA4FRK2S3XJG9.jpg","dateLastActive":"2023-06-21T13:09:56+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":34,"score":null,"hot":3374676333,"url":"https:\/\/community.smartsheet.com\/discussion\/106682\/make-sum-of-one-column-in-function-of-value-of-another","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106682\/make-sum-of-one-column-in-function-of-value-of-another","format":"Rich","lastPost":{"discussionID":106682,"commentID":381436,"name":"Re: Make sum of one column in function of value of another","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381436#Comment_381436","dateInserted":"2023-06-21T11:14:19+00:00","insertUserID":159154,"insertUser":{"userID":159154,"name":"Guillaume B.","url":"https:\/\/community.smartsheet.com\/profile\/Guillaume%20B.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/S5NT3AR3967R\/nA4FRK2S3XJG9.jpg","dateLastActive":"2023-06-21T13:09:56+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-21T11:14:29+00:00","dateAnswered":"2023-06-21T11:14:19+00:00","acceptedAnswers":[{"commentID":381436,"body":"

I finally found the correct formula:<\/p>

=SUMIF([Part number]$185:[Part number]$369, CONTAINS([Part number]167, @cell), Quantity$185:Quantity$369)<\/code><\/strong><\/p>

Like that it is working partially, because as I have sub assemblies, I will need to take the quantity of the PARENT() and multiply it to have the correct value.<\/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&categoryID=322&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&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 in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

公式和函数趋势