=DATE([Year of next Event Adjusted for New Year]1, [Month of Next Event Adjusted if >12]1, 1)
=(NETDAYS([Reference date of a Monday (Used for Calc 2)]@row, [First Day of "Month of Next Event" Part 1 of calc]@row) - (7 * INT(NETDAYS([Reference date of a Monday (Used for Calc 2)]@row, [First Day of "Month of Next Event" Part 1 of calc]@row) / 7)) + 1)
=IF([Weekday of 1st Day of Month Part 2 of calc]1 = 1, [First Day of "Month of Next Event" Part 1 of calc]1 + 1, IF([Weekday of 1st Day of Month Part 2 of calc]1 = 2, [First Day of "Month of Next Event" Part 1 of calc]1 + 0, IF([Weekday of 1st Day of Month Part 2 of calc]1 = 3, [First Day of "Month of Next Event" Part 1 of calc]1 + 6, IF([Weekday of 1st Day of Month Part 2 of calc]1 = 4, [First Day of "Month of Next Event" Part 1 of calc]1 + 5, IF([Weekday of 1st Day of Month Part 2 of calc]1 = 5, [First Day of "Month of Next Event" Part 1 of calc]1 + 4, IF([Weekday of 1st Day of Month Part 2 of calc]1 = 6, [First Day of "Month of Next Event" Part 1 of calc]1 + 3, IF([Weekday of 1st Day of Month Part 2 of calc]1 = 7, [First Day of "Month of Next Event" Part 1 of calc]1 + 2)))))))
=([First Monday of Month Part 3 of calc]1 + [Weekday of recurrence. Sunday = Day 1]1 - 2)
=IF(DAY([First Actual Weekday in Month Part 4 of calc]1) > 7, [First Actual Weekday in Month Part 4 of calc]1 - 7, [First Actual Weekday in Month Part 4 of calc]1)
=IF([Week of Recurrence in Month]@row = 0, [First Day of "Month of Next Event" Part 1 of calc]@row, [Day Corrected if beyond 7 Part 5 of Calc]1 + (([Week of Recurrence in Month]1 - 1) * 7))
=[Actual Next Event Date Part 6 of calc]@row - TODAY()
The above sheet calculates for each row an event date and emails an owner (in a column not seen here) when due. It worked perfectly when I had the reference positioned in one of the other columns but this would have necessitated cells being dragged down when a new row is added.
As a result I repositioned the reference and I have converted most formulae to column formulae but am getting syntax errors when trying to refer to the first cell in the right hand column. I use this cell to figure out what day of the week it is in the 9th column to the left. I want to avoid using cross sheet references as it will confuse the users. (I wont be around to explain) I looked at using a workflow to add the fixed date into every row but that isn't allowed either.
Got it to work. Sometimes in formulating a question, you are forced to think. I changed the formula to eliminate the reference by putting a fixed date like follows. I am sure I could make it more elegant but it is working for me it appears.
=(NETDAYS(DATE(1900, 1, 1), [First Day of "Month of Next Event" Part 1 of calc]@row) - (7 * INT(NETDAYS(DATE(1900, 1, 1), [First Day of "Month of Next Event" Part 1 of calc]@row) / 7)) + 1)
✅Please support the Community by marking your postwiththe accepted answer/helpful. It will make it easier for others to find a solution or help to answer!
Got it to work. Sometimes in formulating a question, you are forced to think. I changed the formula to eliminate the reference by putting a fixed date like follows. I am sure I could make it more elegant but it is working for me it appears.
=(NETDAYS(DATE(1900, 1, 1), [First Day of "Month of Next Event" Part 1 of calc]@row) - (7 * INT(NETDAYS(DATE(1900, 1, 1), [First Day of "Month of Next Event" Part 1 of calc]@row) / 7)) + 1)
✅Please support the Community by marking your postwiththe accepted answer/helpful. It will make it easier for others to find a solution or help to answer!
How exactly is your Data Shuttle set up? If it is set to replace everything in the sheet when it runs, it is deleting the cell being referenced by the widget and then putting new data in new cells.<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":321,"name":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B","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":292,"urlcode":"Dashboards","name":"Dashboards"},{"tagID":474,"urlcode":"data-shuttle","name":"Data Shuttle"}]},{"discussionID":108213,"type":"question","name":"How to spread costs evenly across months, if they fall within those dates","excerpt":"I have various financial line items that span different dates. I'd like the costs to be spread per month automatically based on the date and cost entry. I've tried various functions already, IF, AND, and it says Unpearsable. I'd like to spread out the costs in the Cost column to the months on the right, based on the start…","snippet":"I have various financial line items that span different dates. I'd like the costs to be spread per month automatically based on the date and cost entry. I've tried various…","categoryID":321,"dateInserted":"2023-07-27T19:03:42+00:00","dateUpdated":null,"dateLastComment":"2023-07-28T21:12:20+00:00","insertUserID":164209,"insertUser":{"userID":164209,"name":"AshwiniBiotech2023","title":"Sr. Director, Project Management","url":"https:\/\/community.smartsheet.com\/profile\/AshwiniBiotech2023","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-07-28T23:10:16+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":164209,"lastUser":{"userID":164209,"name":"AshwiniBiotech2023","title":"Sr. Director, Project Management","url":"https:\/\/community.smartsheet.com\/profile\/AshwiniBiotech2023","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-07-28T23:10:16+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":14,"countViews":67,"score":null,"hot":3381071762,"url":"https:\/\/community.smartsheet.com\/discussion\/108213\/how-to-spread-costs-evenly-across-months-if-they-fall-within-those-dates","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108213\/how-to-spread-costs-evenly-across-months-if-they-fall-within-those-dates","format":"Rich","lastPost":{"discussionID":108213,"commentID":387925,"name":"Re: How to spread costs evenly across months, if they fall within those dates","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/387925#Comment_387925","dateInserted":"2023-07-28T21:12:20+00:00","insertUserID":164209,"insertUser":{"userID":164209,"name":"AshwiniBiotech2023","title":"Sr. Director, Project Management","url":"https:\/\/community.smartsheet.com\/profile\/AshwiniBiotech2023","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-07-28T23:10:16+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":"Smartsheet Basics","url":"https:\/\/community.smartsheet.com\/categories\/smartsheet-basics%2B"}],"groupID":null,"statusID":3,"image":{"url":"https:\/\/us.v-cdn.net\/6031209\/uploads\/IBAVVE3YLO8D\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-07-28T09:38:32+00:00","dateAnswered":"2023-07-27T19:21:12+00:00","acceptedAnswers":[{"commentID":387646,"body":"
You would use the below for Jan 2023 and adjust the month and year numbers accordingly for each of the other months.<\/p>
Basically we are creating a yyyymm stamp from the start and end dates and comparing them to the yyyymm stamp for that year\/month combo. The above is for July 2023 (202307).<\/p>"},{"commentID":387906,"body":"