How do I get the sum of total hours worked on this project?

Best Answer

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the公式手册模板!
Internet is back up for a minute!<\/p>


<\/p>

Ok. In that case here is what we are working with:<\/p>

If the Status is \"Complete\" then green<\/p>

If the Status is not complete and the [Sprint End Date] is in the past then red<\/p>

If the Status is \"In Progress\" or \"In QA\" and the [Sprint End Date] is in the next three days then red<\/p>

If the Status is \"In Progress\" or \"In QA\" or \"On Hold\" and the [Sprint End Date] is in the next 6 days then yellow<\/p>


<\/p>

After the formula, I will point out a few potential scenarios that would not output any color based on the above logic. I will also show the difference between trying to follow the same syntax patterns evaluating status and date vs nesting in a specific order.<\/p>


<\/p>

Here is the formula I would use for the above criteria:<\/p>

=IF(Status@row = \"Complete\", \"Green\", IF(OR(AND(OR(Status@row = \"In Progress\", Status@row = \"In QA\"), [Sprint End Date]<= TODAY(3)), [Sprint End Date]@row< TODAY()), \"Red\", IF(AND(OR(Status@row = \"In Progress\", Status@row = \"In QA\", Status@row = \"On Hold\"), [Sprint End Date]@row<= TODAY(6)), \"Yellow\")))<\/p>


<\/p>


<\/p>

Here is a more basic example of the differences between using extra functions for complete and past due vs using nesting logic.<\/p>

=IF(AND(Status@row <> \"Complete\", [Sprint End Date]@row< TODAY()), \"Red\", IF(Status@row = \"Complete\", \"Green\", ...................<\/p>


<\/p>

vs leveraging nesting logic<\/p>

IF(Status@row = \"Complete\", \"Green\", IF([Sprint End Date]@row< TODAY(), \"Red\", ...................<\/p>


<\/p>

You can see that knowing our criteria and leveraging nesting logic makes an impact on both syntax as well as efficiency (and can save some keystrokes too).<\/p>


<\/p>

It also looks like if the status is anything other than one of the ones specifically mentioned, it will show as blank (until it becomes past due). And any of the statuses mentioned will be blank if the end date is 7 or more days in the future.<\/p>

That's not to say you HAVE to change anything. If it works for you then it works for you, but I just wanted to point out that there may be some unexpected gaps in the logic if we haven't thought about what we want to see for each scenario (or at least the scenarios that we want to see some kind of indicator for).<\/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":108708,"type":"question","name":"need pls. advise for formula","excerpt":"Hi, pls. see pic. below: I'm looking formula that will light in green column called greenlight to install , when all other columns are checked and red when at least 1 column is unchecked Thanks in advance Yuval","snippet":"Hi, pls. see pic. below: I'm looking formula that will light in green column called greenlight to install , when all other columns are checked and red when at least 1 column is…","categoryID":322,"dateInserted":"2023-08-09T05:06:59+00:00","dateUpdated":null,"dateLastComment":"2023-08-09T07:38:30+00:00","insertUserID":164719,"insertUser":{"userID":164719,"name":"Yuval","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Yuval","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AAcHTtdS5R8g61Mz8YpTO-F33O2rTr6kCdYdluWCAoRiw3tuqjo=s96-c","dateLastActive":"2023-08-09T15:49:12+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":164719,"lastUser":{"userID":164719,"name":"Yuval","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Yuval","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AAcHTtdS5R8g61Mz8YpTO-F33O2rTr6kCdYdluWCAoRiw3tuqjo=s96-c","dateLastActive":"2023-08-09T15:49:12+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":36,"score":null,"hot":3383125529,"url":"https:\/\/community.smartsheet.com\/discussion\/108708\/need-pls-advise-for-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108708\/need-pls-advise-for-formula","format":"Rich","lastPost":{"discussionID":108708,"commentID":389689,"name":"Re: need pls. advise for formula","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/389689#Comment_389689","dateInserted":"2023-08-09T07:38:30+00:00","insertUserID":164719,"insertUser":{"userID":164719,"name":"Yuval","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Yuval","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AAcHTtdS5R8g61Mz8YpTO-F33O2rTr6kCdYdluWCAoRiw3tuqjo=s96-c","dateLastActive":"2023-08-09T15:49:12+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\/4XRBHBBDEXBW\/green.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"green.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-09T07:50:48+00:00","dateAnswered":"2023-08-09T07:27:46+00:00","acceptedAnswers":[{"commentID":389688,"body":"

Hi Yuval,<\/strong> <\/p>

You can try this formula for your condition- <\/p>

=IF(AND([Materials in Rigotec\/Talad]@row = true, [Materials in CR]@row = true, [HC in Place]@row = true, [QA\/QC done before install]@row = true), \"Green\", IF(AND([Materials in Rigotec\/Talad]@row = false, [Materials in CR]@row = false, [HC in Place]@row = false, [QA\/QC done before install]@row = false), \"\", IF(OR([Materials in Rigotec\/Talad]@row = false, [Materials in CR]@row = false, [HC in Place]@row = false, [QA\/QC done before install]@row = false), \"Red\"))) <\/p>

Hope this will work for you <\/p>"},{"commentID":389689,"body":"

Cool, many thanks Kaveri, working as watch, just copy and paste, perfect<\/p>

Yuval<\/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":108678,"type":"question","name":"How do I get the sum of total hours worked on this project?","excerpt":"","snippet":"","categoryID":322,"dateInserted":"2023-08-08T17:45:22+00:00","dateUpdated":null,"dateLastComment":"2023-08-09T13:41:54+00:00","insertUserID":164765,"insertUser":{"userID":164765,"name":"Brack","url":"https:\/\/community.smartsheet.com\/profile\/Brack","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-09T13:53:25+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-08-09T15:01:22+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":6,"countViews":42,"score":null,"hot":3383108836,"url":"https:\/\/community.smartsheet.com\/discussion\/108678\/how-do-i-get-the-sum-of-total-hours-worked-on-this-project","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108678\/how-do-i-get-the-sum-of-total-hours-worked-on-this-project","format":"Rich","lastPost":{"discussionID":108678,"commentID":389765,"name":"Re: How do I get the sum of total hours worked on this project?","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/389765#Comment_389765","dateInserted":"2023-08-09T13:41:54+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-08-09T15:01:22+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\/PMPZAVUHYAY8\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-09T13:53:30+00:00","dateAnswered":"2023-08-09T13:41:54+00:00","acceptedAnswers":[{"commentID":389765,"body":"

Happy to help. 👍️<\/span><\/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