Want to practice working with formulas directly in Smartsheet?

Check out theFormula Handbook templateto view 100+ formulas, including a glossary of every function and examples of commonly used and advanced formulas.
❓️Product questions
Sign in andask it here!The community's got your back.

Wondering if there’s a problem?
Check out theStatus Pageand subscribe for notifications.

Share your knowledge!
Help others byanswering questions.

Formulas and Functions

Stumped by a formula? Ask for help or find examples to see how others use a formula to solve a similar problem.

Discussion List

=TODAY(-7)","excerpt":"Hi, I have a formula I need help with please, =IF(AND(CONTAINS([Client Name]@row, {Sheet A Range 1}), IF({Sheet A Range 2}, >=TODAY(-7))), \"Match\") ______________ Name = Text column Sheet A Range 1 = Text column Sheet A Range 2 = Date column ______________ Any idea how to correct this #INVALID DATA TYPE? Thank you!","categoryID":322,"dateInserted":"2023-09-14T20:43:47+00:00","dateUpdated":"2023-09-14T21:23:18+00:00","dateLastComment":"2023-09-27T15:05:36+00:00","insertUserID":123243,"insertUser":{"userID":123243,"name":"A Rose","title":"","url":"https:\/\/community.smartsheet.com\/profile\/A%20Rose","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-09-27T18:01:26+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭"},"updateUserID":91566,"lastUserID":123243,"lastUser":{"userID":123243,"name":"A Rose","title":"","url":"https:\/\/community.smartsheet.com\/profile\/A%20Rose","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-09-27T18:01:26+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":12,"countViews":113,"score":null,"hot":3390558563,"url":"https:\/\/community.smartsheet.com\/discussion\/110298\/if-and-contains-with-today-7","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/110298\/if-and-contains-with-today-7","format":"Rich","groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-09-14T22:27:53+00:00","dateAnswered":"2023-09-14T22:27:44+00:00","acceptedAnswers":[]}},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"tags":[],"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}]},{"discussionID":110476,"type":"question","name":"COUNTIF + LAST YEAR INFO","excerpt":"=COUNTIFS({M&A Program Interest}, CONTAINS(\"Buyer Consult\", @cell), {M&A Intake Form Range 1}, @cell > YEAR Trying to utilize this formula; pull metrics from the past year only.","categoryID":322,"dateInserted":"2023-09-19T23:03:40+00:00","dateUpdated":null,"dateLastComment":"2023-09-27T15:04:44+00:00","insertUserID":166915,"insertUser":{"userID":166915,"name":"tmagana","url":"https:\/\/community.smartsheet.com\/profile\/tmagana","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-09-27T14:53:26+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":166915,"lastUser":{"userID":166915,"name":"tmagana","url":"https:\/\/community.smartsheet.com\/profile\/tmagana","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-09-27T14:53:26+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":4,"countViews":45,"score":null,"hot":3390994104,"url":"https:\/\/community.smartsheet.com\/discussion\/110476\/countif-last-year-info","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/110476\/countif-last-year-info","format":"Rich","groupID":null,"statusID":4,"attributes":{"question":{"status":"rejected","dateAccepted":null,"dateAnswered":null,"acceptedAnswers":[]}},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"tags":[],"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}]},{"discussionID":110841,"type":"question","name":"Is it possible to change the Source Sheet from Reference instead of individual references ?","excerpt":"Dear Smart Team, How can we modify the Source Sheet name from the Reference instead of modifying individual references. Scenario. I have created more than 50 References use this reference in different formulas. For Example Question and Answer. Reference \"Ans 1\" for Answer 1 and \"Ans 2\" for Answer 1 and so on, till 50th…","categoryID":322,"dateInserted":"2023-09-27T06:07:36+00:00","dateUpdated":null,"dateLastComment":"2023-09-27T14:21:15+00:00","insertUserID":136854,"insertUser":{"userID":136854,"name":"Ibrahim Khaleel","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Ibrahim%20Khaleel","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/avatarstock\/n65S9PRP4PA0M.png","dateLastActive":"2023-09-27T06:07:38+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-09-27T17:55:47+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":1,"countViews":13,"score":null,"hot":3391619931,"url":"https:\/\/community.smartsheet.com\/discussion\/110841\/is-it-possible-to-change-the-source-sheet-from-reference-instead-of-individual-references","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/110841\/is-it-possible-to-change-the-source-sheet-from-reference-instead-of-individual-references","format":"Rich","groupID":null,"statusID":2,"image":{"url":"https:\/\/us.v-cdn.net\/6031209\/uploads\/JEDFC6A9MFCX\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"answered","dateAccepted":null,"dateAnswered":"2023-09-27T14:21:15+00:00","acceptedAnswers":[]}},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"tags":[{"tagID":254,"urlcode":"formulas","name":"Formulas"},{"tagID":319,"urlcode":"functionality","name":"functionality"}],"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}]},{"discussionID":110825,"type":"question","name":"Need a checkbox checked if two items are true \/ Code not working","excerpt":"looking at an item on line that will give me access to everything that is past due or due within the next two weeks on a project schedule. We built a report but it does not give the parent task associated with the child task. I googled and got something similar to what I need but not quite there. Here is what I need: I…","categoryID":322,"dateInserted":"2023-09-26T21:29:34+00:00","dateUpdated":"2023-09-26T21:30:51+00:00","dateLastComment":"2023-09-27T13:56:32+00:00","insertUserID":162256,"insertUser":{"userID":162256,"name":"delaurellc","title":"Senior Consultant","url":"https:\/\/community.smartsheet.com\/profile\/delaurellc","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/ACg8ocKfkKfhlR3uqOwPWeKsGr1YKov2b3GEBCfVAaaQgcdBkw=s96-c","dateLastActive":"2023-09-27T19:21:06+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":162256,"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-09-27T17:55:47+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":1,"countViews":23,"score":null,"hot":3391587366,"url":"https:\/\/community.smartsheet.com\/discussion\/110825\/need-a-checkbox-checked-if-two-items-are-true-code-not-working","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/110825\/need-a-checkbox-checked-if-two-items-are-true-code-not-working","format":"Rich","groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-09-27T16:21:35+00:00","dateAnswered":"2023-09-27T13:56:32+00:00","acceptedAnswers":[]}},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"tags":[],"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}]}],"title":null,"subtitle":null,"description":null,"viewAllUrl":null,"isMainContent":true,"noCheckboxes":false}">

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the公式手册模板!
Hi @LGraf<\/a> <\/p>

Have an auto number column with the number only, then have your Vendor ID # combine it with the Vendor Type:<\/p>

=[Vendor Type]@row +\"-\"+ [Autonumber column]@row <\/p>

Unfortunately I don't think there is a way to have a dynamic prefix in the auto number column itself.<\/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":110839,"type":"question","name":"Countif and Year","excerpt":"=COUNTIF([Date Reported]:[Date Reported], (YEAR(@cell) = YEAR(TODAY()))) Hi, I'm trying to count the items for this year. But every now and then blank rows seem to appear in the sheet and this calc gives an error. Any better ideas?","snippet":"=COUNTIF([Date Reported]:[Date Reported], (YEAR(@cell) = YEAR(TODAY()))) Hi, I'm trying to count the items for this year. But every now and then blank rows seem to appear in the…","categoryID":322,"dateInserted":"2023-09-27T05:44:12+00:00","dateUpdated":null,"dateLastComment":"2023-09-28T08:20:10+00:00","insertUserID":86826,"insertUser":{"userID":86826,"name":"Improve Consulting","url":"https:\/\/community.smartsheet.com\/profile\/Improve%20Consulting","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!Bd1ewQBq9MQ!3AFff7A8Bvw!nQq9E9sn7sg","dateLastActive":"2023-09-28T08:29:59+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭"},"updateUserID":null,"lastUserID":86826,"lastUser":{"userID":86826,"name":"Improve Consulting","url":"https:\/\/community.smartsheet.com\/profile\/Improve%20Consulting","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!Bd1ewQBq9MQ!3AFff7A8Bvw!nQq9E9sn7sg","dateLastActive":"2023-09-28T08:29:59+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":23,"score":null,"hot":3391683862,"url":"https:\/\/community.smartsheet.com\/discussion\/110839\/countif-and-year","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/110839\/countif-and-year","format":"Rich","lastPost":{"discussionID":110839,"commentID":397368,"name":"Re: Countif and Year","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/397368#Comment_397368","dateInserted":"2023-09-28T08:20:10+00:00","insertUserID":86826,"insertUser":{"userID":86826,"name":"Improve Consulting","url":"https:\/\/community.smartsheet.com\/profile\/Improve%20Consulting","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!Bd1ewQBq9MQ!3AFff7A8Bvw!nQq9E9sn7sg","dateLastActive":"2023-09-28T08:29:59+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-09-28T08:29:57+00:00","dateAnswered":"2023-09-28T08:20:10+00:00","acceptedAnswers":[{"commentID":397368,"body":"

Thanks Nick, I'll give them a go.<\/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":110868,"type":"question","name":"Formula for new column to get a hierarchy view in report","excerpt":"Morning, I am working on code to get some type of hyerarchy view in a report I added the below code and it is just coming up as blank I spread the code out a bit so you could see what I was trying to do, where did i go wrong? =IF(CONTAINS(0, [Task Level]@row), [Task Name]@row, IF(CONTAINS(1, [Task Level]@row), \"--\" + [Task…","snippet":"Morning, I am working on code to get some type of hyerarchy view in a report I added the below code and it is just coming up as blank I spread the code out a bit so you could see…","categoryID":322,"dateInserted":"2023-09-27T16:29:34+00:00","dateUpdated":null,"dateLastComment":"2023-09-27T19:21:19+00:00","insertUserID":162256,"insertUser":{"userID":162256,"name":"delaurellc","title":"Senior Consultant","url":"https:\/\/community.smartsheet.com\/profile\/delaurellc","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/ACg8ocKfkKfhlR3uqOwPWeKsGr1YKov2b3GEBCfVAaaQgcdBkw=s96-c","dateLastActive":"2023-09-27T19:21:06+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":162256,"lastUser":{"userID":162256,"name":"delaurellc","title":"Senior Consultant","url":"https:\/\/community.smartsheet.com\/profile\/delaurellc","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/ACg8ocKfkKfhlR3uqOwPWeKsGr1YKov2b3GEBCfVAaaQgcdBkw=s96-c","dateLastActive":"2023-09-27T19:21:06+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":5,"countViews":35,"score":null,"hot":3391677653,"url":"https:\/\/community.smartsheet.com\/discussion\/110868\/formula-for-new-column-to-get-a-hierarchy-view-in-report","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/110868\/formula-for-new-column-to-get-a-hierarchy-view-in-report","format":"Rich","lastPost":{"discussionID":110868,"commentID":397311,"name":"Re: Formula for new column to get a hierarchy view in report","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/397311#Comment_397311","dateInserted":"2023-09-27T19:21:19+00:00","insertUserID":162256,"insertUser":{"userID":162256,"name":"delaurellc","title":"Senior Consultant","url":"https:\/\/community.smartsheet.com\/profile\/delaurellc","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/ACg8ocKfkKfhlR3uqOwPWeKsGr1YKov2b3GEBCfVAaaQgcdBkw=s96-c","dateLastActive":"2023-09-27T19:21:06+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"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\/BWRA81LZOH8P\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-09-27T17:41:20+00:00","dateAnswered":"2023-09-27T17:31:07+00:00","acceptedAnswers":[{"commentID":397286,"body":"

Instead of the CONTAINS function, try making it equal to the number:<\/p>

=IF([Task level]@row = 0<\/strong>, [Task name]@row, ....................<\/p>


<\/p>

You can also save yourself some keystrokes by using the nested IF to generate just the dashes and then add the task name to the end of the nested IF.<\/p>

=IF(.....IF(.....IF(.....))) + [Task Name]@row <\/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":[]}">

Trending in Formulas and Functions