Home

Formula help on figuring days remaining

%3CLINGO-SUB%20id%3D%22lingo-sub-652001%22%20slang%3D%22en-US%22%3EFormula%20help%20on%20figuring%20days%20remaining%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-652001%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20the%20attached%20workbook%20on%20SHEET1%20in%20Cell%20M3%2C%20i%20am%20trying%20to%20get%20it%20to%20calculate%20rain%20days%20based%20on%20the%20corresponding%20month.%20Once%20i%20get%20this%20figured%20out%20i%20will%20transfer%20the%20formula%20to%2012%20MO.%20Road%20tab%2C%2024%20Mo.%20Road%20tab%20and%20the%2036%20MO.%20Road%20tab.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20i%20am%20needing%20it%20to%20do%20is%2C%20lets%20say%20its%20September%204th%2C%202018%2C%20there%20are%203%20rain%20days%20allotted%20for%20Sept.%2C%20then%20there%20should%20be%203%20days%20remaining%20in%20Cell%20M3%2C%20but%20if%20its%20the%2024th%20of%20Sept%20then%20there%20should%20only%20be%201%20day%20showing%20in%20Cell%20M3.%20Or%20if%20its%20the%2014th%20there%20should%20only%20be%202%20days%20showing%20in%20Cell%20M3.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%2C%20in%20Cell%20P3%20is%20there%20a%20way%20to%20figure%20if%20the%20holiday%20has%20already%20passed%3F%26nbsp%3B%20Lets%20say%20its%20January%209th%2C%202019%20and%20there%20is%202%20holidays%20allowed%20for%20January.%20One%20of%20them%20is%20observed%20on%20the%201st%20and%20the%20other%20one%20is%20observed%20on%20the%203rd%20Monday%20of%20the%20month.%20Is%20there%20a%20way%20to%20calculate%20Holidays%20remaining%20for%20the%20month%20based%20on%20the%20date%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOverall%2C%20what%20i'm%20trying%20to%20do%20is%2C%20on%20the%2012%2C%2024%20%26amp%3B%20the%2036%20Mo.%20tabs%20is%20to%20enter%20in%20dates%20in%20Cells%20B5%20%26amp%3B%20B6%20and%20everything%20in%20the%20Gray%20table%20automatically%20calculates%20everything%20else.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20any%20of%20this%20possible%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-652001%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-654902%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20help%20on%20figuring%20days%20remaining%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-654902%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F339153%22%20target%3D%22_blank%22%3E%40drt_80%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20which%20cells%20you%20need%20help%20on%20the%20formula%3F%20For%20example%2C%20how%20do%20you%20determine%20the%20result%20to%20be%20returned%20by%20the%20formula%20in%20Sheet1M3%3F%3C%2FP%3E%3CP%3EYou%20stated%20that%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%22%3CSTRONG%3EWhat%20i%20am%20needing%20it%20to%20do%20is%2C%20lets%20say%20its%20September%204th%2C%202018%2C%20there%20are%203%20rain%20days%20allotted%20for%20Sept.%2C%20then%20there%20should%20be%203%20days%20remaining%20in%20Cell%20M3%2C%20but%20if%20its%20the%2024th%20of%20Sept%20then%20there%20should%20only%20be%201%20day%20showing%20in%20Cell%20M3.%20Or%20if%20its%20the%2014th%20there%20should%20only%20be%202%20days%20showing%20in%20Cell%20M3.%3C%2FSTRONG%3E%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EWhen%20do%20those%203%20rain%20days%20occur%20in%20the%20month%20of%20September%3F%20Does%20the%20formula%20for%20Sheet!M3%20refer%20to%20the%20month%20of%20September%20only%3F%20What%20about%20the%20occurrences%20of%20rain%20days%20in%20other%20months%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20may%20also%20add%20some%20more%20questions%20for%20you%20to%20answer%20but%20I%20believe%20it%20is%20better%20if%20you%20explain%20your%20requirement%20yourself.%20In%20explaining%2C%20try%20your%20very%20best%20to%20consider%20all%20possibilities%20and%20the%20result%20you%20want%20for%20each%20possibility.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-655047%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20help%20on%20figuring%20days%20remaining%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-655047%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20needing%20these%20formulas%20to%20be%20on%20the%2012%20MO.%20tab%20in%20the%20Gray%20table.%20I%20have%20formulas%20set%20up%20on%20this%20tab%20to%20populate%20the%20Gray%20table%20based%20on%20the%20value%20of%20Cell%20B6%2C%20once%20Cell%20B6%20is%20populated%20Cell%20A19%20equals%20B6%2C%20then%20the%20rest%20of%20the%20Gray%20table%20populates%20based%20on%20the%20value%20of%20Cell%20A19.%20The%20attached%20workbook%20shows%20in%20Cell%20A19%26nbsp%3B%205%2F1%2F2019%2C%20then%20info.%20is%20pulled%20from%20Sheet1%20for%20May.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOn%20the%20Sheet1%20tab%2Cin%20Column%20E%20there%20are%20set%20rain%20days%20for%20each%20month.%20In%20May%20there%20are%202%20historical%20rain%20days%20for%20the%20month.%201%20rain%20day%20would%20be%20allowed%20for%20the%201st%20thru%20the%2015th%20and%20the%20second%20rain%20day%20would%20be%20for%20the%2016th%20thru%20the%2031st.%2031%2F2%3D%2015.5%20days%20for%20each%20rain%20day.%20In%20January%20there%20are%203%20historical%20rain%20days%20for%20that%20month.%201%20day%20would%20be%20allowed%20for%20the%201st%20thru%20the%2010th%2C%20the%20next%20rain%20day%20would%20be%20allowed%20the%2011th%20thru%20the%2020th%20and%20the%20last%20rain%20day%20is%20from%20the%2021st%20to%20the%20end%20of%20the%20month.%20So%20to%20make%20it%20simple%20for%20every%20month%20take%20the%20calendar%20days%20divided%20by%20Rain%20days.%20For%20January%20it%20would%20be%2031%2F3%3D%2010.33%20days%20for%20each%20rain%20day.%20In%20July%2C%20there%20are%204%20rain%20days%20allowed%2C%20so%20that%20would%20be%20each%20rain%20day%20is%207.75%20days.%2031%2F4%3D7.75.%20To%20simplify%20it%20just%20round%20it%20to%208%20days.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELet%20me%20know%20if%20you%20need%20anything%20else.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3BThanks!%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F280482%22%20target%3D%22_blank%22%3E%40Twifoo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-655187%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20help%20on%20figuring%20days%20remaining%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-655187%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F339153%22%20target%3D%22_blank%22%3E%40drt_80%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EM3%3D%3DDIAS.LAB.INTL('12%20MO.%20Road'!A19%3B'12%20MO.%20Road'!A19%2B'12%20MO.%20Road'!B19%3B%3B%24E%243%3A%24E%2414)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-655329%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20help%20on%20figuring%20days%20remaining%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-655329%22%20slang%3D%22en-US%22%3EI%20get%20an%20error%20of%20to%20many%20arguments%20for%20this%20function.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-655615%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20help%20on%20figuring%20days%20remaining%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-655615%22%20slang%3D%22en-US%22%3ESo%2C%20the%20formula%20you%20need%20is%20limited%20to%20rain%20days%20only%20for%20each%20of%20the%203%20sheets.%20Being%20clearer%20now%2C%20perhaps%20I%20can%20give%20you%20the%20formula%20tomorrow.%20I%E2%80%99m%20just%20replying%20to%20you%20now%20via%20mobile%20phone.%3CBR%20%2F%3EHopefully%2C%20with%20your%20clearer%20explanation%20and%20my%20understanding%20of%20the%20logic%20thereof%2C%20we%20will%20both%20arrive%20at%20an%20answer%20acceptable%20to%20you.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-655716%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20help%20on%20figuring%20days%20remaining%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-655716%22%20slang%3D%22en-US%22%3EOk%2C%20Thank%20you.%3CBR%20%2F%3E%3CBR%20%2F%3EBasically%2C%20if%20i%20can%20get%20it%20to%20work%20on%20the%2012%20mo.%20tab%20i%20can%20transfer%20the%20formulas%20to%20the%2024%20and%2036%20mo.%20tabs.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-657366%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20help%20on%20figuring%20days%20remaining%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-657366%22%20slang%3D%22en-US%22%3EThe%20formulas%20in%20each%20of%20the%203%20sheets%20for%20Columns%20D%20to%20G%20appear%20to%20return%20the%20correct%20results.%20Please%20clarify%20the%20relationship%20of%20those%20formulas%20with%20your%20statement%20that%3A%3CBR%20%2F%3E%22The%20rain%20days%20are%20allocated%20to%20each%20month%2C%20such%20that%20if%20there%20are%202%20rain%20days%2C%201%20rain%20day%20is%20allocated%20to%20the%201st%20to%2015th%20of%20the%20month%20and%20the%20other%201%20rain%20day%20is%20allocated%20to%20the%2016th%20to%20end%20of%20the%20month.%22%3CBR%20%2F%3EI%20see%20no%20relationship%20at%20all%20given%20that%20all%20your%20dates%20in%20Column%20A%20for%20each%20of%20the%203%20sheets%20are%20for%20the%201st%20day%20of%20each%20month.%20Thus%2C%20there%20appears%20no%20need%20for%20the%20allocation%20you%20stated.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-657935%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20help%20on%20figuring%20days%20remaining%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-657935%22%20slang%3D%22en-US%22%3EOn%20the%2012%2C%2024%2C%20%26amp%3B%2036%20Mo.%20Tabs%20in%20the%20gray%20table%2C%20that%20information%20is%20pulled%20from%20Sheet1%20depending%20on%20what%20month%20is%20populated%20in%20Cell%20A19.%20Then%20Cells%20A20%20thru%20to%20the%20last%20month%20on%20the%20Gray%20Table%2C%20then%20columns%20B%20thru%20H%20populate%20accordingly.%20If%20the%20date%20in%20Cell%20A19%20is%205%2F30%2F2019%20the%20cells%20B19%3AG19%20will%20remain%20the%20same%2C%20resulting%20in%20Cell%20C19%20meaning%20that%20there%20is%20still%209%20weekend%20days%20remaining%20for%20the%20month%2C%20Cell%20D19%20meaning%20there%20are%202%20rain%20days%20remaining%20for%20the%20month%2C%20etc.%20I%20have%20the%20formula%20to%20calculate%20the%20weekend%20days%20remaining%20on%20sheet%201%20in%20Cell%20L3%20.%20I%20just%20haven't%20transferred%20the%20formula%20yet.%3CBR%20%2F%3E%3CBR%20%2F%3E%22The%20rain%20days%20are%20allocated%20to%20each%20month%2C%20such%20that%20if%20there%20are%202%20rain%20days%2C%201%20rain%20day%20is%20allocated%20to%20the%201st%20to%2015th%20of%20the%20month%20and%20the%20other%201%20rain%20day%20is%20allocated%20to%20the%2016th%20to%20end%20of%20the%20month.%22%20For%20this%20here%2C%20based%20on%20the%20month%20that%20is%20populated%20in%20column%20A%20(it%20doesn't%20matter%20what%20year)%20column%20D%20will%20populate%20the%20Rain%20Days%20allowed%20for%20the%20entire%20month%20pulling%20that%20information%20from%20Sheet1.%20In%20Column%20A%20the%20first%20and%20last%20months%20populated%20will%20not%20always%20be%20on%20the%20first%20of%20each%20month.%20My%20logical%20reasoning%20for%201%20day%20be%20allowed%20for%20the%20first%20thru%20the%2015th%20and%20the%202nd%20day%20be%20for%20the%2016th%20thru%20the%20end%20of%20the%20month%20is%20just%20splitting%20the%20month%20in%20half.%20Or%2C%20if%20it%20has%203%20days%20allowed%20split%20the%20month%20into%203rd's%2C%20just%20for%20simplistic%20reasons.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-661466%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20help%20on%20figuring%20days%20remaining%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-661466%22%20slang%3D%22en-US%22%3EI%20regret%20to%20inform%20you%20that%2C%20based%20on%20your%20apparently%20painstaking%20explanation%2C%20I%20unfortunately%20found%20no%20cogent%20reason%20to%20suggest%20any%20solution%20to%20an%20issue%20which%2C%20for%20me%20as%20of%20now%2C%20is%20impliedly%20inexistent.%3CBR%20%2F%3EIf%20you%20can%20attach%20a%20sample%20file%20with%20the%20expected%20results%20for%20each%20possibility%20you%20claim%20to%20exist%2C%20I%20can%20perhaps%20give%20you%20an%20objective%20solution.%3C%2FLINGO-BODY%3E
drt_80
Occasional Contributor

In the attached workbook on SHEET1 in Cell M3, i am trying to get it to calculate rain days based on the corresponding month. Once i get this figured out i will transfer the formula to 12 MO. Road tab, 24 Mo. Road tab and the 36 MO. Road tab.

 

What i am needing it to do is, lets say its September 4th, 2018, there are 3 rain days allotted for Sept., then there should be 3 days remaining in Cell M3, but if its the 24th of Sept then there should only be 1 day showing in Cell M3. Or if its the 14th there should only be 2 days showing in Cell M3.

 

Also, in Cell P3 is there a way to figure if the holiday has already passed?  Lets say its January 9th, 2019 and there is 2 holidays allowed for January. One of them is observed on the 1st and the other one is observed on the 3rd Monday of the month. Is there a way to calculate Holidays remaining for the month based on the date?

 

Overall, what i'm trying to do is, on the 12, 24 & the 36 Mo. tabs is to enter in dates in Cells B5 & B6 and everything in the Gray table automatically calculates everything else.

 

Is any of this possible?

9 Replies

@drt_80 

In which cells you need help on the formula? For example, how do you determine the result to be returned by the formula in Sheet1M3?

You stated that: 

"What i am needing it to do is, lets say its September 4th, 2018, there are 3 rain days allotted for Sept., then there should be 3 days remaining in Cell M3, but if its the 24th of Sept then there should only be 1 day showing in Cell M3. Or if its the 14th there should only be 2 days showing in Cell M3."

When do those 3 rain days occur in the month of September? Does the formula for Sheet!M3 refer to the month of September only? What about the occurrences of rain days in other months?

I may also add some more questions for you to answer but I believe it is better if you explain your requirement yourself. In explaining, try your very best to consider all possibilities and the result you want for each possibility. 

I am needing these formulas to be on the 12 MO. tab in the Gray table. I have formulas set up on this tab to populate the Gray table based on the value of Cell B6, once Cell B6 is populated Cell A19 equals B6, then the rest of the Gray table populates based on the value of Cell A19. The attached workbook shows in Cell A19  5/1/2019, then info. is pulled from Sheet1 for May. 

 

On the Sheet1 tab,in Column E there are set rain days for each month. In May there are 2 historical rain days for the month. 1 rain day would be allowed for the 1st thru the 15th and the second rain day would be for the 16th thru the 31st. 31/2= 15.5 days for each rain day. In January there are 3 historical rain days for that month. 1 day would be allowed for the 1st thru the 10th, the next rain day would be allowed the 11th thru the 20th and the last rain day is from the 21st to the end of the month. So to make it simple for every month take the calendar days divided by Rain days. For January it would be 31/3= 10.33 days for each rain day. In July, there are 4 rain days allowed, so that would be each rain day is 7.75 days. 31/4=7.75. To simplify it just round it to 8 days.

 

Let me know if you need anything else.

 

 Thanks!@Twifoo 

@drt_80 

M3==DIAS.LAB.INTL('12 MO. Road'!A19;'12 MO. Road'!A19+'12 MO. Road'!B19;;$E$3:$E$14)

I get an error of to many arguments for this function.
So, the formula you need is limited to rain days only for each of the 3 sheets. Being clearer now, perhaps I can give you the formula tomorrow. I’m just replying to you now via mobile phone.
Hopefully, with your clearer explanation and my understanding of the logic thereof, we will both arrive at an answer acceptable to you.
Ok, Thank you.

Basically, if i can get it to work on the 12 mo. tab i can transfer the formulas to the 24 and 36 mo. tabs.
The formulas in each of the 3 sheets for Columns D to G appear to return the correct results. Please clarify the relationship of those formulas with your statement that:
"The rain days are allocated to each month, such that if there are 2 rain days, 1 rain day is allocated to the 1st to 15th of the month and the other 1 rain day is allocated to the 16th to end of the month."
I see no relationship at all given that all your dates in Column A for each of the 3 sheets are for the 1st day of each month. Thus, there appears no need for the allocation you stated.
On the 12, 24, & 36 Mo. Tabs in the gray table, that information is pulled from Sheet1 depending on what month is populated in Cell A19. Then Cells A20 thru to the last month on the Gray Table, then columns B thru H populate accordingly. If the date in Cell A19 is 5/30/2019 the cells B19:G19 will remain the same, resulting in Cell C19 meaning that there is still 9 weekend days remaining for the month, Cell D19 meaning there are 2 rain days remaining for the month, etc. I have the formula to calculate the weekend days remaining on sheet 1 in Cell L3 . I just haven't transferred the formula yet.

"The rain days are allocated to each month, such that if there are 2 rain days, 1 rain day is allocated to the 1st to 15th of the month and the other 1 rain day is allocated to the 16th to end of the month." For this here, based on the month that is populated in column A (it doesn't matter what year) column D will populate the Rain Days allowed for the entire month pulling that information from Sheet1. In Column A the first and last months populated will not always be on the first of each month. My logical reasoning for 1 day be allowed for the first thru the 15th and the 2nd day be for the 16th thru the end of the month is just splitting the month in half. Or, if it has 3 days allowed split the month into 3rd's, just for simplistic reasons.
I regret to inform you that, based on your apparently painstaking explanation, I unfortunately found no cogent reason to suggest any solution to an issue which, for me as of now, is impliedly inexistent.
If you can attach a sample file with the expected results for each possibility you claim to exist, I can perhaps give you an objective solution.
Related Conversations
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
PacketMon Components are not loading in WAC 1909
HotCakeX in Windows Admin Center on
2 Replies