How do I use the TODAY() function in a formula based on a specific date?

I have a field that calculates a fee (this fee is part of the formula INDEX({IF - Parks & Rec Range}, MATCH([Land Use]@row, {IF - Land User Range}, 0)) * [For Each]@row). For the time period of 7/1/2023 - 6/30/2024, I want to calculate the fee at 50%. For 7/1/2024 - 6/30/2025, 75%. After 7/1/2025, 100%.

This formula is not working, it's getting #INVALID OPERATION. I want to note that the issue is probably in the TODAY() call because I get the same result with the following formula:

=IF(TODAY() < {Impact Fee Range 1}, "Past Due") -- {Impact Fee Range 1} is a date field on another sheet holding 7/1/2024

My Formula:

=IF(TODAY() <= "07/01/24", INDEX({IF - Parks & Rec Range}, MATCH([Land Use]@row, {IF - Land User Range}, 0)) * [For Each]@row * 0.5, IF(TODAY() <= "07/01/25", INDEX({IF - Parks & Rec Range}, MATCH([Land Use]@row, {IF - Land User Range}, 0)) * [For Each]@row * 0.75,INDEX({IF - Parks & Rec Range}, MATCH([Land Use]@row, {IF - Land User Range}, 0)) * [For Each]@row)

NOTE: In my formula, {IF - Parks & Rec Range}, the IF stands for Impact Fees and is not an IF statement.

Best Answer

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the公式手册模板!
@GHustad1<\/a> It's easiest to check for blank cells in the range, then sum if there are none, like this:<\/p>


<\/p>

=IF(COUNTIF([Retail \/ Non-Retail Helper Column]@row:[Resources Required - Helper Column]@row, ISBLANK(@cell)) = 0, SUM([Retail \/ Non-Retail Helper Column]@row:[Resources Required - Helper Column]@row), \"//www.santa-greenland.com/community/discussion/105073/\")<\/p>


<\/p>

The formula counts the number if blank cells in the range, if there is at least one, the count will NOT equal 0, and it will insert \"//www.santa-greenland.com/community/discussion/105073/\", else if there are values in all cells, it sums the range.<\/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":108059,"type":"question","name":"Rolling 12 Months using AVG COLLECT formula help","excerpt":"Hi, I am looking for some help. I am using the above SUMIFS, however doing an AVG COLLECT with two criteria. I can get the above formula to work for 6 months, however I am at a loss to get it to work for 12 months in the past. Below is my current formula and would appreciate any help. =ROUND(AVG(COLLECT({Data days from…","snippet":"Hi, I am looking for some help. I am using the above SUMIFS, however doing an AVG COLLECT with two criteria. I can get the above formula to work for 6 months, however I am at a…","categoryID":322,"dateInserted":"2023-07-25T19:33:59+00:00","dateUpdated":null,"dateLastComment":"2023-07-25T21:02:29+00:00","insertUserID":133636,"insertUser":{"userID":133636,"name":"Tina Davis","url":"https:\/\/community.smartsheet.com\/profile\/Tina%20Davis","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-07-25T21:05:06+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":133636,"lastUser":{"userID":133636,"name":"Tina Davis","url":"https:\/\/community.smartsheet.com\/profile\/Tina%20Davis","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-07-25T21:05:06+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":5,"countViews":31,"score":null,"hot":3380635588,"url":"https:\/\/community.smartsheet.com\/discussion\/108059\/rolling-12-months-using-avg-collect-formula-help","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108059\/rolling-12-months-using-avg-collect-formula-help","format":"Rich","lastPost":{"discussionID":108059,"commentID":387021,"name":"Re: Rolling 12 Months using AVG COLLECT formula help","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/387021#Comment_387021","dateInserted":"2023-07-25T21:02:29+00:00","insertUserID":133636,"insertUser":{"userID":133636,"name":"Tina Davis","url":"https:\/\/community.smartsheet.com\/profile\/Tina%20Davis","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-07-25T21:05: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,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-07-25T21:02:37+00:00","dateAnswered":"2023-07-25T20:56:32+00:00","acceptedAnswers":[{"commentID":387019,"body":"

I provided a link in my last comment. Is it not working?<\/p>


<\/p>

Basically I suggested that you use 365 days (or -183 to +183) instead of trying to use dates.<\/p>


<\/p>

AND(@cell>= TODAY(-183), @cell<= TODAY(183))<\/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":108053,"type":"question","name":"IF(JOIN(COLLECT Statement","excerpt":"Hello! I am using this formula to collect a set of ID numbers based on a criteria. =JOIN(COLLECT([MED ID 2]:[MED ID 2], [Duplicates 2]:[Duplicates 2], >1), \" \") This gives me exactly what I need, but I want to wrap it in an IF function so that if the criteria is not met, the cell will say \"No\" This is what I've been trying…","snippet":"Hello! I am using this formula to collect a set of ID numbers based on a criteria. =JOIN(COLLECT([MED ID 2]:[MED ID 2], [Duplicates 2]:[Duplicates 2], >1), \" \") This gives me…","categoryID":322,"dateInserted":"2023-07-25T18:34:54+00:00","dateUpdated":null,"dateLastComment":"2023-07-25T20:04:05+00:00","insertUserID":163466,"insertUser":{"userID":163466,"name":"sawuzie","url":"https:\/\/community.smartsheet.com\/profile\/sawuzie","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-07-25T22:27:21+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":162305,"lastUser":{"userID":162305,"name":"Cory Page","title":"Revenue Cycle Analyst & Informatics","url":"https:\/\/community.smartsheet.com\/profile\/Cory%20Page","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-07-25T20:39:23+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":5,"countViews":38,"score":null,"hot":3380628539,"url":"https:\/\/community.smartsheet.com\/discussion\/108053\/if-join-collect-statement","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108053\/if-join-collect-statement","format":"Rich","lastPost":{"discussionID":108053,"commentID":387001,"name":"Re: IF(JOIN(COLLECT Statement","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/387001#Comment_387001","dateInserted":"2023-07-25T20:04:05+00:00","insertUserID":162305,"insertUser":{"userID":162305,"name":"Cory Page","title":"Revenue Cycle Analyst & Informatics","url":"https:\/\/community.smartsheet.com\/profile\/Cory%20Page","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-07-25T20:39:23+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-07-25T20:07:10+00:00","dateAnswered":"2023-07-25T19:27:02+00:00","acceptedAnswers":[{"commentID":386993,"body":"

Ok, I think I see whats going on there is no error when nothing is found so things are coming out blank. <\/p>

This should let you say no when the collect finds nothing, sorry I probably should have just built the formula and tested it real quick. <\/p>

Updated: I had to add your original Join Collect its way easier for you to review that was I would think. <\/p>

=IF(JOIN(COLLECT([MED ID 2]:[MED ID 2], [Duplicates 2]:[Duplicates 2], >1), \" \") = \"//www.santa-greenland.com/community/discussion/105073/\", \"No\", JOIN(COLLECT([MED ID 2]:[MED ID 2], [Duplicates 2]:[Duplicates 2], >1), \" \")))<\/p>

If you translate this to your sheet it should do the trick I would think.. <\/p>

\n
\n \n \"image.png\"<\/img><\/a>\n <\/div>\n<\/div>\n


<\/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