使用IF语句和DATE

我试图结合公式,如果一个复选框被点击,它返回数字7给我,否则它运行从今天减去日期的公式,但不幸的是,我一直得到#无效的数据类型

=如果(或((电子邮件保护),“7”),(今天)-(电子邮件保护)))

任何帮助将是非常感激的。谢谢。

标签:

最佳答案

答案

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

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

请查看公式手册模板!
The alert will only send them rows that they are listed as assigned to. The entire sheet will not be shown in the email.<\/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":106720,"type":"question","name":"Percentage complete based on Y or N for six categories.","excerpt":"Hello I am trying to develop a formula that would provide percentage complete triggering on Y for each category. So, in short, if one Y is seen, display 18, if two Y's are seen, display 36, if three Y's are seen, display 54, if four Y's are seen, display 72, if five Y's are seen, display 90, and if six Y's are seen,…","categoryID":322,"dateInserted":"2023-06-21T18:24:22+00:00","dateUpdated":null,"dateLastComment":"2023-06-22T12:12:35+00:00","insertUserID":155082,"insertUser":{"userID":155082,"name":"Cristian","url":"https:\/\/community.smartsheet.com\/profile\/Cristian","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AAcHTtcKDnyq8FmYjuhOFCk_LYZQ2zWK_KI0waOp6i093w=s96-c","dateLastActive":"2023-06-22T13:14:05+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-22T16:36:21+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":6,"countViews":38,"score":null,"hot":3374811417,"url":"https:\/\/community.smartsheet.com\/discussion\/106720\/percentage-complete-based-on-y-or-n-for-six-categories","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106720\/percentage-complete-based-on-y-or-n-for-six-categories","format":"Rich","lastPost":{"discussionID":106720,"commentID":381703,"name":"Re: Percentage complete based on Y or N for six categories.","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381703#Comment_381703","dateInserted":"2023-06-22T12:12:35+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-22T16:36:21+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-22T10:16:30+00:00","dateAnswered":"2023-06-21T19:37:55+00:00","acceptedAnswers":[{"commentID":381599,"body":"

If all rows are next to each other, you can use<\/p>

=MAX(COUNTIFS(TestOne@row:TestSix@row, @cell = \"Y\") * 18, 100)<\/p>


<\/p>

If they are not next to each other, you will need to \"add\" your IFs together instead of nesting them.<\/p>

=MAX(IF(TestOne@row = \"Y\", 18, 0) + IF(TestTwo@row = \"Y\", 18, 0) + IF(TestThree@row = \"Y\", 18, 0) + .................., 100)<\/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":106749,"type":"question","name":"How to count how many interviews in the current week?","excerpt":"I am currently trying to track how many interviews are scheduled in the current week per fleet type? The formula I have is counting 7 days from today but I would like to be able to count for the current week. =COUNTIFS([Interview Date]:[Interview Date], @cell = TODAY(7), [Interview Date]:[Interview Date], @cell > TODAY(),…","categoryID":322,"dateInserted":"2023-06-22T01:59:46+00:00","dateUpdated":null,"dateLastComment":"2023-06-22T03:13:30+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-22T03:41:23+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":161714,"lastUser":{"userID":161714,"name":"Carson Penticuff","url":"https:\/\/community.smartsheet.com\/profile\/Carson%20Penticuff","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/B0Q390EZX8XK\/nBGT0U1689CN6.jpg","dateLastActive":"2023-06-22T16:50:23+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":38,"score":null,"hot":3374804596,"url":"https:\/\/community.smartsheet.com\/discussion\/106749\/how-to-count-how-many-interviews-in-the-current-week","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106749\/how-to-count-how-many-interviews-in-the-current-week","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":106749,"commentID":381670,"name":"Re: How to count how many interviews in the current week?","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381670#Comment_381670","dateInserted":"2023-06-22T03:13:30+00:00","insertUserID":161714,"insertUser":{"userID":161714,"name":"Carson Penticuff","url":"https:\/\/community.smartsheet.com\/profile\/Carson%20Penticuff","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/B0Q390EZX8XK\/nBGT0U1689CN6.jpg","dateLastActive":"2023-06-22T16:50:23+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-22T03:41:21+00:00","dateAnswered":"2023-06-22T03:13:30+00:00","acceptedAnswers":[{"commentID":381670,"body":"

My apologies, I was counting interviews remaining in the current week. This will give you total interviews for the current week.<\/p>

=COUNTIFS([Interview Date]:[Interview Date], @cell <= TODAY(7 - WEEKDAY(TODAY())), [Interview Date]:[Interview Date], @cell > TODAY() - WEEKDAY(TODAY()), Fleet:Fleet, \"A220\")<\/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"}]}],"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":[]}">

公式和函数趋势