IF错误添加到公式中
答案
帮助文章资源欧宝体育app官方888
类别
I use a notepad to write nested ifs clearly, then I remove the formating to place it in a cell.<\/p>
1rst, lets convert the pseudo code to smartsheet syntaxt:<\/p>
IF([Renewal Date]@row>Today(),\"Expired\", else...)<\/p>
IF([Renewal Date]@row >=Today(-60),\"Upcoming\", else...)<\/p>
IF([Renewal Date]@row <Today(-60),\"On Time\", else...)<\/p>
IF(isblank([Renewal Date]@row),\"No Renewal\", \"//www.santa-greenland.com/community/discussion/comment/\")<\/p>
Now we need to put them all in one line.<\/p>
=IF([Renewal Date]@row>Today(),\"Expired\",IF([Renewal Date]@row >=Today(-60),\"Upcoming\",IF([Renewal Date]@row <Today(-60),\"On Time\",IF(isblank([Renewal Date]@row),\"No Renewal\",\"//www.santa-greenland.com/community/discussion/comment/\"))))<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-10-20 14:16:40","updateUser":{"userID":133854,"name":"Jorge Silva","url":"https:\/\/community.smartsheet.com\/profile\/Jorge%20Silva","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!24DUPyyA42Y!7KNVu-N2THQ!7dyANFx4cFf","dateLastActive":"2022-10-20T16:20:23+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":96801,"type":"question","name":"Any idea why when one of my criteria is from Letter 'A' through 'M' I'm getting 'INVALID DATA TYPE'","excerpt":"but not when the criteria is N? This is working OK, =COUNTIFS({BIN}, \"N\", {Status}, \"Qualified Occupied\", {Move Out}, MONTH(@cell) = MONTH(Date@row), {Move Out}, YEAR(@cell) = YEAR(Date@row)) But when I replace N with A i get an error =COUNTIFS({BIN}, \"A\", {Status}, \"Qualified Occupied\", {Move Out}, MONTH(@cell) =…","categoryID":322,"dateInserted":"2022-10-19T19:27:48+00:00","dateUpdated":null,"dateLastComment":"2022-10-20T13:09:34+00:00","insertUserID":139461,"insertUser":{"userID":139461,"name":"heyjay","url":"https:\/\/community.smartsheet.com\/profile\/heyjay","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-10-20T13:24:32+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":"2022-10-20T14:13:24+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":7,"countViews":34,"score":null,"hot":3332483242,"url":"https:\/\/community.smartsheet.com\/discussion\/96801\/any-idea-why-when-one-of-my-criteria-is-from-letter-a-through-m-im-getting-invalid-data-type","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/96801\/any-idea-why-when-one-of-my-criteria-is-from-letter-a-through-m-im-getting-invalid-data-type","format":"Rich","lastPost":{"discussionID":96801,"commentID":347940,"name":"Re: Any idea why when one of my criteria is from Letter 'A' through 'M' I'm getting 'INVALID DATA TYPE'","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/347940#Comment_347940","dateInserted":"2022-10-20T13:09:34+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":"2022-10-20T14:13:24+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\/5Y3MEBA82ZEF\/gif-10-19-22-3-26-50-pm.gif","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"GIF 10-19-22 3-26-50 PM.gif"},"attributes":{"question":{"status":"accepted","dateAccepted":"2022-10-20T13:25:19+00:00","dateAnswered":"2022-10-19T19:40:40+00:00","acceptedAnswers":[{"commentID":347841,"body":"
I am guessing that you most likely don't have date values for rows where the {BIN} is A - M. Try this and see if it works:<\/p>
=COUNTIFS({BIN}, [BIN #]@row, {Status}, \"Qualified Occupied\", {Move Out}, AND(IFERROR(MONTH(@cell), 0) = MONTH(Date@row), IFERROR(YEAR(@cell), 0) = YEAR(Date@row))<\/strong>)<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-10-20 13:25:19","updateUser":{"userID":139461,"name":"heyjay","url":"https:\/\/community.smartsheet.com\/profile\/heyjay","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-10-20T13:24:32+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":[]}">