Welcome to the Smartsheet Forum Archives


The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, pleaseVisit the Current Forums.

Revenue per month Formula extending beyond 1 year

I have a sheet that I have created to forecast revenue per month based on forecasted schedules and dollars/project. Currently this just goes for 1 year, but with projects now starting late Q4 2017 and going into Q1 of 2018, I am needing to revise this formula to add a year definition. Would love if someone could take a look and give me some advice, I would appreciate it!

Attached are 2 screen shots - 1 of the overview of the sheet and the other is the detail of the formula. This formula is in the Jan column for the 3873 Job.

Here is the formula:

= IFERROR(如果(和(> = 1月1美元MONTH($ConStart6), Jan$1 <= MONTH($ConFin6)), $[Total Amount]6 / (MONTH($ConFin6) - MONTH($ConStart6) + 1)), "--")

Any help would be appreciated.

Revenue Formula Detail.JPG

Revenue per month overview.JPG

Comments

  • Hello,

    This is a neat challenge! FULL DISCLOSURE, I haven't been able to test this function out on my own. I may have added too many parenthesis. Regardless, this is what I have:

    =IFERROR(IF(AND(DATE(Jan$2, MONTH(Jan$1), 1) >= $ConStart6, DATE(Jan$3, MONTH(Jan$1), 1) <= $ConFin6, $[Total Amount]6/ ((MONTH(DATE(Jan$2, MONTH($ConFin6), DAY($ConFin6))) + MONTH(DATE(Jan$3, MONTH($ConFin6), MONTH($ConFin6), DAY($ConFin6)))) - MONTH($ConStart6)) + 1)), "--")

    If you receive an #UNPARSEABLE error, then fiddle with the parenthesis and double-check my cell references to make sure I typed everything correctly.

    To break down your function sans IFERROR:

    IF(AND(Jan$1 >= MONTH($ConStart6), Jan$1 <= MONTH($ConFin6)), ...

    You might change this to be more centered around creating a date out of your Month and Years rows instead. You may also need to consider a years start and years end row, and ensure that they're all formatted the same way with a four digit year. The following example is based on you having a Year End row as row 3:

    IF(AND(DATE(YEAR(Jan$2), MONTH(Jan$1), 1) >= $ConStart6, AND(DATE(YEAR(Jan$3), MONTH(Jan$1), 1) <= $ConFin6, ...

    Now for the second part of your function that actually does the math:

    ..., $[Total Amount]6/ (MONTH($ConFin6) - MONTH($ConStart6) + 1))

    This is a bit trickier, since MONTH will only return values 1-12. If you, hypothetically, have a project that starts 11/05/17 and ends 2/25/18, that's 4 months total. Here's what I came up with:

    ..., $[Total Amount]6/ ((MONTH(DATE(Jan$2, MONTH($ConFin6), DAY($ConFin6))) + MONTH(DATE(Jan$3, MONTH($ConFin6), DAY($ConFin6)))) - MONTH($ConStart6)) + 1))

    This SHOULD give you the total number of ConFin months and allow you to subtract the ConStart month from that. Again, I haven't been able to test this out, I'm purely going on testing it out in my head.

    If this doesn't work out, let me know why and I might be able to think of something else. For reference, here's our complete functions list if you are inspired from my function:https://help.smartsheet.com/functions

  • Also to reiterate because I posted a wall of text:

    The function I've made will require you to add an extra row with a "Year End" at the top so that you have a Year Start and Year End. If you don't want to do that, you could probably get away with changing my ...DATE(Jan$2, ... to reference $ConStart6 and Jan$3 to reference $ConFin6

    Try it out!

This discussion has been closed.
TODAY(), OR(Status@row <> \"Wrapped\", Status@row <>…","snippet":"Hello! I’m having trouble getting a flag to turn on if my Production Wraps column date is in the past and the status is NOT “wrapped” or “wrapped\/aired”. Here’s the formula I’m…","categoryID":322,"dateInserted":"2023-09-21T23:30:58+00:00","dateUpdated":null,"dateLastComment":"2023-09-22T00:21:06+00:00","insertUserID":167234,"insertUser":{"userID":167234,"name":"Will C","url":"https:\/\/community.smartsheet.com\/profile\/Will%20C","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-09-22T00:18:01+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":167234,"lastUser":{"userID":167234,"name":"Will C","url":"https:\/\/community.smartsheet.com\/profile\/Will%20C","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-09-22T00:18:01+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":18,"score":null,"hot":3390682324,"url":"https:\/\/community.smartsheet.com\/discussion\/110633\/how-do-you-set-a-flag-status-if-a-date-is-in-the-past-and-status-does-not-equal-a-certain-criteria","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/110633\/how-do-you-set-a-flag-status-if-a-date-is-in-the-past-and-status-does-not-equal-a-certain-criteria","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":110633,"commentID":396562,"name":"Re: How do you set a flag status if a date is in the past and status does not equal a certain criteria?","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/396562#Comment_396562","dateInserted":"2023-09-22T00:21:06+00:00","insertUserID":167234,"insertUser":{"userID":167234,"name":"Will C","url":"https:\/\/community.smartsheet.com\/profile\/Will%20C","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-09-22T00:18:01+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-22T00:20:03+00:00","dateAnswered":"2023-09-22T00:17:06+00:00","acceptedAnswers":[{"commentID":396561,"body":"

Hi @Will C<\/a> ,<\/p>

I'm not sure why you are getting #incorrect because your formula seems syntactically correct. It could be that you have a non-date in a date field?<\/p>

Having said that, if I'm reading your requirement correctly, that formula would not give the desired result. Try this and see if it's the results you are looking for.<\/p>

=IF(AND([Production Wraps]@row < TODAY(), Status@row <> \"Wrapped\", Status@row <> \"Wrapped\/Aired\"), 1, 0)<\/p>

Hope that helps,<\/p>

Dave<\/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":110618,"type":"question","name":"MAX DATE FROM 3 COLUMNS","excerpt":"Hi, On a separate sheet I would like to capture the max (or last) date from another sheet. As shown below, I would like to log the latest \"DATE OF VISIT\" from the 3 treatment columns. In this example the correct date would be 9\/06\/23. I've tried multiple versions of MAX(COLLECT but am only getting the first date, not the…","snippet":"Hi, On a separate sheet I would like to capture the max (or last) date from another sheet. As shown below, I would like to log the latest \"DATE OF VISIT\" from the 3 treatment…","categoryID":322,"dateInserted":"2023-09-21T20:55:50+00:00","dateUpdated":null,"dateLastComment":"2023-09-21T21:48:33+00:00","insertUserID":124866,"insertUser":{"userID":124866,"name":"Sam Lugiano","url":"https:\/\/community.smartsheet.com\/profile\/Sam%20Lugiano","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/EW9J0HEOWPA3\/nHSZYW5EKFGWU.jpg","dateLastActive":"2023-09-21T21:48:44+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭"},"updateUserID":null,"lastUserID":124866,"lastUser":{"userID":124866,"name":"Sam Lugiano","url":"https:\/\/community.smartsheet.com\/profile\/Sam%20Lugiano","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/EW9J0HEOWPA3\/nHSZYW5EKFGWU.jpg","dateLastActive":"2023-09-21T21:48:44+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":19,"score":null,"hot":3390664463,"url":"https:\/\/community.smartsheet.com\/discussion\/110618\/max-date-from-3-columns","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/110618\/max-date-from-3-columns","format":"Rich","lastPost":{"discussionID":110618,"commentID":396551,"name":"Re: MAX DATE FROM 3 COLUMNS","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/396551#Comment_396551","dateInserted":"2023-09-21T21:48:33+00:00","insertUserID":124866,"insertUser":{"userID":124866,"name":"Sam Lugiano","url":"https:\/\/community.smartsheet.com\/profile\/Sam%20Lugiano","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/EW9J0HEOWPA3\/nHSZYW5EKFGWU.jpg","dateLastActive":"2023-09-21T21:48:44+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\/ZJ09BK0J5ZT3\/capture-jpg.jpg","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"Capture.JPG"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-09-21T21:48:41+00:00","dateAnswered":"2023-09-21T21:13:16+00:00","acceptedAnswers":[{"commentID":396547,"body":"

@Sam Lugiano<\/a> What formula are you using? Does it matter which columns are checked, or if at least 1 is checked? I would recommend a helper column on this sheet that helps with the find. Name it Helper Date, or whatever you want. Set the formula to be<\/p>

=IFERROR(IF(COUNTIF([PAIN MGT INIT]@row:[PAIN MGT D\/C]@row, 1)>0, [DATE OF VISIT]@row),\"//www.santa-greenland.com/community/discussion/11521/\") <\/p>

Then where you are trying to grab the info you will use<\/p>

=MAX([HELPER DATE]:[HELPER DATE])<\/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":110591,"type":"question","name":"INVALID DATA TYPE Error in single cell of column formula","excerpt":"Hello, I am getting one cell returning the \"INVALID DATA TYPE\" error in a column formula. I have 159 rows in this sheet, and only one cell has the error, so I am very confused. The formulas is: =COUNTIFS({Site Visits Range 1}, Type@row, {Site Visits Range 3}, [Primary Column]@row, {Site Visits Range 2}, <>\"//www.santa-greenland.com/community/discussion/11521/\", {Site Visits…","snippet":"Hello, I am getting one cell returning the \"INVALID DATA TYPE\" error in a column formula. I have 159 rows in this sheet, and only one cell has the error, so I am very confused.…","categoryID":322,"dateInserted":"2023-09-21T16:33:29+00:00","dateUpdated":null,"dateLastComment":"2023-09-21T19:00:21+00:00","insertUserID":144966,"insertUser":{"userID":144966,"name":"kelceyg","title":"Associate Project Manager","url":"https:\/\/community.smartsheet.com\/profile\/kelceyg","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/QOWM4DMFF87J\/n3NJCD8AR6ZO1.jpg","dateLastActive":"2023-09-21T20:26:08+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭"},"updateUserID":null,"lastUserID":144966,"lastUser":{"userID":144966,"name":"kelceyg","title":"Associate Project Manager","url":"https:\/\/community.smartsheet.com\/profile\/kelceyg","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/QOWM4DMFF87J\/n3NJCD8AR6ZO1.jpg","dateLastActive":"2023-09-21T20:26:08+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":21,"score":null,"hot":3390638030,"url":"https:\/\/community.smartsheet.com\/discussion\/110591\/invalid-data-type-error-in-single-cell-of-column-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/110591\/invalid-data-type-error-in-single-cell-of-column-formula","format":"Rich","tagIDs":[210,219,254,472],"lastPost":{"discussionID":110591,"commentID":396527,"name":"Re: INVALID DATA TYPE Error in single cell of column formula","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/396527#Comment_396527","dateInserted":"2023-09-21T19:00:21+00:00","insertUserID":144966,"insertUser":{"userID":144966,"name":"kelceyg","title":"Associate Project Manager","url":"https:\/\/community.smartsheet.com\/profile\/kelceyg","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/QOWM4DMFF87J\/n3NJCD8AR6ZO1.jpg","dateLastActive":"2023-09-21T20:26:08+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\/14XWFKFS2BZO\/sheet.jpg","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"sheet.jpg"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-09-21T19:02:19+00:00","dateAnswered":"2023-09-21T17:17:11+00:00","acceptedAnswers":[{"commentID":396499,"body":"

@kelceyg<\/a> <\/p>

Only thing that sticks out is the YEAR() function.<\/p>

Check {Site Visits Range 2} sheet and add a column there with the year function and see if anything is giving you an error.<\/p>

This could mean it does not have a proper date in the cell.<\/p>

You could also add an IFERROR() in your formula to ignore them: IFERROR(YEAR(@cell),0) = 2023<\/strong><\/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":210,"urlcode":"human-resources","name":"Human Resources"},{"tagID":219,"urlcode":"sheets","name":"Sheets"},{"tagID":254,"urlcode":"formulas","name":"Formulas"},{"tagID":472,"urlcode":"cell-linking","name":"Cell linking"}]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&siteSectionID=0&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 Posts","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

Trending Posts