公式:如果选中复选框,则加减

大家好,我想要一份表格,告诉我我们仓库里还有多少货物。

其理念是,员工通过仪表盘报告他们是否正在取货或退货。

如果用户勾选了“IN”或“OUT”列,他们还必须添加金额。当从库存中取出某物时,该金额应从总数量中减去(如果选中了“out”列)。他们带回的金额必须添加(如果“IN”列被选中)。

公式应在“剩余数量”一栏。

我知道这在smartsheet中当然是可能的,但我想不出正确的公式。

谁能给我一个解决方案或者给我指出正确的方向?

谢谢!

Afbeelding1.png


最佳答案

  • 吉纳维芙P。
    吉纳维芙P。 员工管理
    ✓回答

    @TomorrowlandSup

    我要做的是设置两个条件求和年代语句。

    如果“动作”匹配当前行中的动作,则一个SUMIFS将把Amount列中的所有值相加而且如果选中了IN框。

    第二个SUMIFS将执行同样的操作,但前提是选中OUT框。

    一旦你有了这两个总数,你可以从总数中+和-它们。


    试着这样做:

    =[总数量]@行+ SUMIFS(金额:金额,动作:动作,(电子邮件保护), In:In, 1) - SUMIFS(金额:金额,动作:动作,(电子邮件保护):, 1)


    欢呼,

    吉纳维芙

答案

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

Hi @Mick Tim<\/a> <\/p>

I hope you're well and safe!<\/p>

To add to Darren's excellent advice\/answer.<\/p>

Try something like this.<\/p>

=IF(OR([Jul Accidents]@row = 0, [Jul Accidents]@row = \"//www.santa-greenland.com/community/discussion/89287/\"), \"No Accidents\", IF([Jul Accidents]@row = 0, July@row, SUM([Jul Accidents]@row * 200000 \/ July@row)))<\/p>

Did that work\/help? <\/p>

I hope that helps!<\/p>

Be safe, and have a fantastic weekend!<\/p>

Best,<\/p>

Andrée Starå<\/strong><\/a> | Workflow Consultant \/ CEO @ WORK BOLD<\/strong><\/a><\/p>

Did my post(s) help or answer your question or solve your problem? Please support the Community by <\/em>marking it Insightful\/Vote Up, Awesome, or\/and as the accepted answer<\/em><\/strong>. It will make it easier for others to find a solution or help to answer!<\/em><\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-09-23 07:45:59","updateUser":{"userID":145999,"name":"Mick Tim","url":"https:\/\/community.smartsheet.com\/profile\/Mick%20Tim","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-09-23T07:44:56+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":[{"tagID":219,"urlcode":"Sheets","name":"Sheets"},{"tagID":254,"urlcode":"Formulas","name":"Formulas"},{"tagID":281,"urlcode":"Support","name":"Support"},{"tagID":285,"urlcode":"Solution Center","name":"Solution Center"},{"tagID":319,"urlcode":"functionality","name":"functionality"}]},{"discussionID":95810,"type":"question","name":"list of tasks completed with in the last week.","excerpt":"I am looking to set up a report that would show the number of tasks marked as complete with in the last week. but I don't want it to run off of the dates in the due date column but rather off of the actual date it was changed, In case some on is early or late on a project I want to know week over week what was done. Any…","categoryID":322,"dateInserted":"2022-09-22T17:53:32+00:00","dateUpdated":null,"dateLastComment":"2022-09-22T20:37:01+00:00","insertUserID":144732,"insertUser":{"userID":144732,"name":"J.Barrow","url":"https:\/\/community.smartsheet.com\/profile\/J.Barrow","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-09-22T20:33:33+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":144732,"lastUser":{"userID":144732,"name":"J.Barrow","url":"https:\/\/community.smartsheet.com\/profile\/J.Barrow","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-09-22T20:33:33+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":20,"score":null,"hot":3327749433,"url":"https:\/\/community.smartsheet.com\/discussion\/95810\/list-of-tasks-completed-with-in-the-last-week","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/95810\/list-of-tasks-completed-with-in-the-last-week","format":"Rich","lastPost":{"discussionID":95810,"commentID":344489,"name":"Re: list of tasks completed with in the last week.","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/344489#Comment_344489","dateInserted":"2022-09-22T20:37:01+00:00","insertUserID":144732,"insertUser":{"userID":144732,"name":"J.Barrow","url":"https:\/\/community.smartsheet.com\/profile\/J.Barrow","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-09-22T20:33:33+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\/1DA91ALO8BME\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2022-09-23T01:13:21+00:00","dateAnswered":"2022-09-22T18:08:36+00:00","acceptedAnswers":[{"commentID":344468,"body":"

@J.Barrow<\/a> There isn't a vanilla Smarsheet formula to do that. However, I think you are trying to make it more complicated than it needs to be :) . I suggest the following:<\/p>

  1. Create a date column to track when the task is completed<\/li>
  2. Create a workflow automation to record a date in that column when the status changes to \"Complete\"<\/li><\/ol>


    <\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-09-23 01:13:21","updateUser":{"userID":150538,"name":"Preston P.","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Preston%20P.","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/avatarstock\/nWVKDFTEFOKBN.png","dateLastActive":"2022-09-23T01:19:53+00:00","banned":0,"punished":0,"private":false,"label":"Employee Admin"}}},"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":95791,"type":"question","name":"COUNTIF\/CONTAINS","excerpt":"Hello, I am attempting to count how many times a specific word appears in a text entry in a column. I normally achieve this by filtering by \"contains\" on the actual data sheet. My goal here is to automate this with a formula. Example: Count how many times the Resolution column contains \"duplicate\" I have tried the COUNTIF…","categoryID":322,"dateInserted":"2022-09-22T15:33:14+00:00","dateUpdated":null,"dateLastComment":"2022-09-22T17:12:39+00:00","insertUserID":152723,"insertUser":{"userID":152723,"name":"chelsi.johnson","url":"https:\/\/community.smartsheet.com\/profile\/chelsi.johnson","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!wx9nv0OzvvM!c5lk5xPUwzs!ncykvroFsEa","dateLastActive":"2022-09-22T19:03:55+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":152723,"lastUser":{"userID":152723,"name":"chelsi.johnson","url":"https:\/\/community.smartsheet.com\/profile\/chelsi.johnson","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!wx9nv0OzvvM!c5lk5xPUwzs!ncykvroFsEa","dateLastActive":"2022-09-22T19:03:55+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":23,"score":null,"hot":3327728753,"url":"https:\/\/community.smartsheet.com\/discussion\/95791\/countif-contains","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/95791\/countif-contains","format":"Rich","lastPost":{"discussionID":95791,"commentID":344455,"name":"Re: COUNTIF\/CONTAINS","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/344455#Comment_344455","dateInserted":"2022-09-22T17:12:39+00:00","insertUserID":152723,"insertUser":{"userID":152723,"name":"chelsi.johnson","url":"https:\/\/community.smartsheet.com\/profile\/chelsi.johnson","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!wx9nv0OzvvM!c5lk5xPUwzs!ncykvroFsEa","dateLastActive":"2022-09-22T19:03:55+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\/2Z271KRUD1QT\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2022-09-22T17:44:54+00:00","dateAnswered":"2022-09-22T15:45:40+00:00","acceptedAnswers":[{"commentID":344433,"body":"

    Hi @chelsi.johnson<\/a> <\/p>

    I hope you're well and safe!<\/p>

    Try something like this.<\/p>

    =COUNTIFS(Resolution:Resolution, CONTAINS(\"Duplicate\", @cell))<\/p>

    Did that work\/help? <\/p>

    I hope that helps!<\/p>

    Be safe, and have a fantastic week!<\/p>

    Best,<\/p>

    Andrée Starå<\/strong><\/a> | Workflow Consultant \/ CEO @ WORK BOLD<\/strong><\/a><\/p>

    Did my post(s) help or answer your question or solve your problem? Please support the Community by <\/em>marking it Insightful\/Vote Up, Awesome, or\/and as the accepted answer<\/em><\/strong>. It will make it easier for others to find a solution or help to answer!<\/em><\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-09-22 17:44:54","updateUser":{"userID":152723,"name":"chelsi.johnson","url":"https:\/\/community.smartsheet.com\/profile\/chelsi.johnson","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!wx9nv0OzvvM!c5lk5xPUwzs!ncykvroFsEa","dateLastActive":"2022-09-22T19:03:55+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":[]}],"title":"Trending in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">