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.
Comments
-
Shaine Greenwood Employee
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
-
Shaine Greenwood Employee
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!
Categories
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":"