Automatic breakdown of hours into columns
Answers
-
Paul Newcome ✭✭✭✭✭✭
I just noticed that you have this twice in your formula
ISNUMBER($[Start Date]1)
Try changing it from ISNUMBER to ISDATE.
-
Michaela Kamenska ✭✭✭✭✭✭
ok so I used this formula (see my previous comment, I've not noticed we changed to "ISNUMBER" test)
=IF($Position1 = "SS", IF(AND(ISNUMBER($[SS Hours]1), ISDATE($[Start Date]1), ISNUMBER($[Duration (months)]1), [Apr-20]$6 < $[End Date]1, [Apr-20]$6 >= $[Start Date]1), $[SS Hours]1 / $[Duration (months)]1, ""), IF($Position1 = "MO", IF(AND(ISNUMBER($[MO Hours]1), ISDATE($[Start Date]1), ISNUMBER($[Duration (months)]1), [Apr-20]$6 < $[End Date]1, [Apr-20]$6 >= $[Start Date]1), $[MO Hours]1 / $[Duration (months)]1, ""), ""))
and it still comes back as invalid operation. Should we add something else somewhere? Or am I missing properly closed condition (parentheses) somewhere?
-
Michaela Kamenska ✭✭✭✭✭✭
@Paul Newcomeor is it the spaces before/after signs like before ", before and after /, before and after <...? I am so lost.
-
Paul Newcome ✭✭✭✭✭✭
What exactly is in[Apr-20]$6?
我刚刚意识到行号是不同的。It looks like you are comparing it to a date, but if I am not mistaken, your [Apr-20] is a text/number type.
-
Michaela Kamenska ✭✭✭✭✭✭
That is something I did not understand in Excel either, unfortunately.
I think I tried converting those values from $6 to "@row" but think it still didn't work. Now I tried converting all those values (including 1 and changing it to @row), but it says #UNPARSEABLE:
=IF(AND(ISNUMBER($[SS Hours]@row), ISDATE($[Start Date]@row), ISNUMBER($[Duration (months)]@row), [Apr-20]@row < $[End Date]@row, [Apr-20]@row >= $[Start Date]@row), $[SS Hours]@row / $[Duration (months)]@row, ""), IF(AND(ISNUMBER($[MO Hours]@row), ISDATE($[Start Date]@row), ISNUMBER($[Duration (months)]@row), [Apr-20]@row < $[End Date]@row, [Apr-20]@row >= $[Start Date]@row), $[MO Hours]@row / $[Duration (months)]@row, ""), ""))
I think the dollar sign means absolute value in Excel, tried deleting that too but it says #UNPARSEABLE :
=IF(AND(ISNUMBER([SS Hours]@row), ISDATE([Start Date]@row), ISNUMBER([Duration (months)]@row), [Apr-20]@row < [End Date]@row, [Apr-20]@row >= [Start Date]@row), [SS Hours]@row / [Duration (months)]@row, ""), IF(AND(ISNUMBER([MO Hours]@row), ISDATE([Start Date]@row), ISNUMBER([Duration (months)]@row), [Apr-20]@row < [End Date]@row, [Apr-20]@row >= [Start Date]@row), [MO Hours]@row / [Duration (months)]@row, ""), ""))
-
Michaela Kamenska ✭✭✭✭✭✭
Yes, [Apr-20] onwards are all text/number formatted as I need numerical value there
-
Paul Newcome ✭✭✭✭✭✭
But it has data that represents a date? Can you provide a screenshot that includes that cell along with the formula cell?
-
Michaela Kamenska ✭✭✭✭✭✭
@Paul NewcomeI am not sure if this helps, but I provide a sample with the formulas in excel that work. Please note lots of columns are hidden in the sheet, however, my intention is to apply the formula for the incoming projects, not the past ones.
Hopefully you'll get the idea of what I'm trying to achieve :) The data in [Apr-20] onwards should show average hours per month, my idea is to put the formula in my whole row so it autopopulates as in the excel sample I provided ( you can try to just change the hours, start date or duration and the numbers automatically change).
-
Paul Newcome ✭✭✭✭✭✭
One of the differences (which I think is coming into play here) is that in Excel you can format individual cells whereas in Smartsheet you can only format on the column level. If you are trying to reference a date in a text/number column, then we will need to use a DATE function with MID/LEFT/RIGHT functions to get it into a formula as an actual date.
Can you show the SS in a screenshot that also includes the[Apr-20]$6cell?
-
Michaela Kamenska ✭✭✭✭✭✭
Is this what you mean?
I have a mock sheet where I'm just entering values in SS or MO to get us sorted :)
-
Paul Newcome ✭✭✭✭✭✭
Exactly what does the date in[Apr-20]$6look like? How is it formatted?
-
Michaela Kamenska ✭✭✭✭✭✭
The [Apr-20] as well aas all columns onwards are formatted as number/text:
There is currently a numerical value in them inputted manually.
-
Paul Newcome ✭✭✭✭✭✭
The bold portion in your formula below is why I am asking about that particular cell. You are trying to compare a number to a date. This is where the error is coming from.
=IF($Position1 = "SS", IF(AND(ISNUMBER($[SS Hours]1), ISDATE($[Start Date]1), ISNUMBER($[Duration (months)]1),[Apr-20]$6 < $[End Date]1, [Apr-20]$6 >= $[Start Date]1), $[SS Hours]1 / $[Duration (months)]1, ""), IF($Position1 = "MO", IF(AND(ISNUMBER($[MO Hours]1), ISDATE($[Start Date]1), ISNUMBER($[Duration (months)]1),[Apr-20]$6 < $[End Date]1, [Apr-20]$6 >= $[Start Date]1), $[MO Hours]1 / $[Duration (months)]1, ""), ""))
If you are trying to input a date into[Apr-20]$6for comparison, then we need to figure out how exactly you are entering that date so that we can piece it together in a DATE function so that it can actually be used in the formula as a date.
mm/dd/yy
mm/dd/yyyy
dd/mm/yy
dd/mm/yyyy
dd-MON-yy
etc.
-
Michaela Kamenska ✭✭✭✭✭✭
@Paul Newcomethat's the thing, I am not trying to input a date into the [Apr-20] column or the ones afterwards. My intention is to have a numerical value there. So if I have a project that runs from 01 April 2020 to 31 March 2021 (12 months) and my budgeted hours in total for the project are 120, then I would like to have the [Apr-20] [May-20].....[March 21] to be automatically populated with number 10. So I would like the [Apr-20] etc column to have formulas there, so when I get a new project, I only enter the date, duration and budgeted hours, and the rest of the columns [Apr-20] etc will populate with a value obtained by division of budgeted hours/duration.
So I do not have to manually go into respective columns and drag fill them for the duration of the study, but that it will automatically calculate and populate, like in the sample Excel sheet I shared here:
Is there any way this would be possible??
-
Michaela Kamenska ✭✭✭✭✭✭
I understand now what you mean, so my question now is whether something similar would be possible at all?
Help Article Resources
Categories
Check out theFormula Handbook template!
Instead of applying the formula to \"Multiselect Text String\" row, did you tried with \"Multiselect Values\" row?<\/p>
=IF(HAS([Multiselect Values]@row, [Component ID]@row), \"MATCH\", \"NO MATCH\")<\/p>
Thank you,<\/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":109493,"type":"question","name":"I am having trouble using \"And\", \"OR\" & \"Countif(s)\" to build a formula.","excerpt":"Hello, I am attempting to come up with a sheet summary formula that counts cells if they meet at least one of 3 different statuses in the same column, AND also meet one of 5 different statuses in a separate column. So using the screenshot I've provided as an example (although it doesn't have 5 different statuses in the…","snippet":"Hello, I am attempting to come up with a sheet summary formula that counts cells if they meet at least one of 3 different statuses in the same column, AND also meet one of 5…","categoryID":322,"dateInserted":"2023-08-25T20:03:21+00:00","dateUpdated":null,"dateLastComment":"2023-08-26T00:34:49+00:00","insertUserID":165710,"insertUser":{"userID":165710,"name":"SmarsheetNewb","url":"https:\/\/community.smartsheet.com\/profile\/SmarsheetNewb","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-26T00:33:27+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-08-27T02:16:35+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":26,"score":null,"hot":3386005690,"url":"https:\/\/community.smartsheet.com\/discussion\/109493\/i-am-having-trouble-using-and-or-countif-s-to-build-a-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/109493\/i-am-having-trouble-using-and-or-countif-s-to-build-a-formula","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":109493,"commentID":392692,"name":"Re: I am having trouble using \"And\", \"OR\" & \"Countif(s)\" to build a formula.","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/392692#Comment_392692","dateInserted":"2023-08-26T00:34:49+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-08-27T02:16:35+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-08-26T00:33:25+00:00","dateAnswered":"2023-08-25T20:44:12+00:00","acceptedAnswers":[{"commentID":392662,"body":"
Try this:<\/p>
=COUNTIFS([Item Number]:[Item Number], OR(@cell = \"C001\", @cell = \"COO2\", @cell = \"COO3\", @cell = \"COO4\"), [Status]:[Status], OR(@cell = \"Green\", @cell = \"Yellow\", @cell = \"Red\"))<\/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"}]},{"discussionID":109474,"type":"question","name":"Help with date calculation formula","excerpt":"Hello, I'm trying to find a formula that will help me calculate how long an intake took to resolve. The rows I need to be calculated are Date Reported & Resolution Date. If the resolution date is blank I want it to use the current date in the calculation to see how long this issue has gone unresolved. Any help is much…","snippet":"Hello, I'm trying to find a formula that will help me calculate how long an intake took to resolve. The rows I need to be calculated are Date Reported & Resolution Date. If the…","categoryID":322,"dateInserted":"2023-08-25T16:29:39+00:00","dateUpdated":"2023-08-25T16:29:59+00:00","dateLastComment":"2023-08-25T23:01:30+00:00","insertUserID":165688,"insertUser":{"userID":165688,"name":"Nwest","title":"Systems Analyst","url":"https:\/\/community.smartsheet.com\/profile\/Nwest","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!ukHVZ18ImX4!BcjWAe8S9SY!l7iQo_PZHOx","dateLastActive":"2023-08-25T17:22:30+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":165688,"lastUserID":8888,"lastUser":{"userID":8888,"name":"Andrée Starå","title":"Smartsheet Expert Consultant & Partner | Workflow Consultant \/ CEO @ WORK BOLD","url":"https:\/\/community.smartsheet.com\/profile\/Andr%C3%A9e%20Star%C3%A5","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/0PAU3GBYQLBT\/nXWM7QXGD6464.jpg","dateLastActive":"2023-08-26T17:06:33+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":25,"score":null,"hot":3385987269,"url":"https:\/\/community.smartsheet.com\/discussion\/109474\/help-with-date-calculation-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/109474\/help-with-date-calculation-formula","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":109474,"commentID":392687,"name":"Re: Help with date calculation formula","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/392687#Comment_392687","dateInserted":"2023-08-25T23:01:30+00:00","insertUserID":8888,"insertUser":{"userID":8888,"name":"Andrée Starå","title":"Smartsheet Expert Consultant & Partner | Workflow Consultant \/ CEO @ WORK BOLD","url":"https:\/\/community.smartsheet.com\/profile\/Andr%C3%A9e%20Star%C3%A5","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/0PAU3GBYQLBT\/nXWM7QXGD6464.jpg","dateLastActive":"2023-08-26T17:06:33+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-08-25T17:04:22+00:00","dateAnswered":"2023-08-25T16:36:59+00:00","acceptedAnswers":[{"commentID":392622,"body":"