SharePoint Workflow Date Range - sharepoint

I'm trying to have a range of days that are blacked out on a SharePoint calendar. Any event added between 3/1/2021 and 3/15/2021 should automatically be denied. I have it working if the dates requested off are between 3/1/2021 and 3/15/2021, but I can't see to make it work if the date range for the event starts outside the blackout date range but ends during the blackout period. For example: The start date is 2/25/2021 and the end date is 3/11/2021. I want that request to reject and it isn't.
Current Programming
When I try to change the "and" between the date range to "or" it just says any date is during a blackout period and blocks everything.
How can I get events that start or end durning the blackout period to reject?
Thanks,
Laura

Related

Excel VBA Scheduled message pop up box reminder

I want to create a script that sends a msg box at a specific time on a specific day of the week. eg every Monday at 10am.
Sub Reminder()
Dim time As Range
Set time = Sheets("Main").Range("W11")
If time.Value = "Monday 10:00" Then
MsgBox "Time reminder"
End If
End Sub
Tp try and make this work, I have a cell that's formatted to show the day and time in "W11" that's formatted to match the if function, but still doesn't seem to want to work. Note: I had it almost working before but not sure what I was doing differently, however the msgbox would pop up every time I clicked for the whole minute and wasn't only one instance. It seems like it should be really simple.
What is the exact contents of W11? When formatting a date in Excel, the actual contents doesn't change, only the appearance of that date. The content might be "1/1-2023 10:00", and the appearance "Monday 10:00". Which means that W11 is not equal to "Monday 10:00".
Also, the current code will never work as intended, unless the code is run at exactly monday at 10 am. You will need a time range, check if current date/time is larger than monday 10:00 or a constantly listinging "listener" to do that.
Provide some sample data, if you need further assistance.

Excel formula for entering bi-weekly dates

I have the following worksheet:
The grid is filled with the following formula (this example is from cell H4) that populates the grid based on inputs from the table on the left, =IF($A4="","",IF(AND($E4="Daily",H$2>=$D4,H$2<=$G4),IF(RIGHT($F4,2)="30",LEFT($F4,LEN($F4)-2)&"/",IF(RIGHT($F4,2)="00",LEFT($F4,LEN($F4)-2),$F4)),IF(AND($E4="Weekly",H$2>=$D4,H$2<=$G4,TEXT(H$2,"DDD")=TEXT($D4,"DDD")),IF(RIGHT($F4,2)="30",LEFT($F4,LEN($F4)-2)&"/",IF(RIGHT($F4,2)="00",LEFT($F4,LEN($F4)-2),$F4)),IF(AND($E4="Bi-Weekly",H$2>=$D4,H$2<=$G4,MOD($D4+14,H$2)=0),IF(RIGHT($F4,2)="30",LEFT($F4,LEN($F4)-2)&"/",IF(RIGHT($F4,2)="00",LEFT($F4,LEN($F4)-2),$F4)),IF(AND($E4="Monthly",H$2>=$D4,H$2<=$G4,TEXT(H$2,"MM/DD/YYYY")=CONCATENATE(TEXT(H$2,"MM"),"/",TEXT($D4,"DD"),"/",TEXT($D4,"YYYY"))),IF(RIGHT($F4,2)="30",LEFT($F4,LEN($F4)-2)&"/",IF(RIGHT($F4,2)="00",LEFT($F4,LEN($F4)-2),$F4)),IF(COUNTIF('PowerPoint Gantt'!$A$5:$A$12,$A4)=1,IF(H$2=VLOOKUP($A4,'PowerPoint Gantt'!$A$5:$E$12,5,FALSE)+31,"R",""),""))))))
The only part of the function that isn't working is the Bi-Weekly selection. I can't figure out how to get recurring entries. I can get the start date and one 14 day period after. I've tried using the CEILING function also but still only gets me the next 14th day marked, instead of every 14th day. And ideas?
In your rule for Bi-Weekly meetings, it seems that
MOD($D4+14,H$2)=0
should be replaced with
MOD(H$2-$D4,14)=0
The latter takes the difference between the starting date and the actual date and checks to see if that can be divided by 14, the number of days in 2 weeks.
Your rule for Weekly meetings could be approached similarly, which seems simpler to me than a rule based on the name of the day, like you are using now.

excel validation custom function

This is my first post so hopefully it will be within regulations etc.
I am trying to write a data validation using the custom option.
The validation needs to check a date against potentially 3 other dates. I say potentially as one might not be filled in.
The the first two are boundary dates CalSD and CalED (Calendar Start Date and Calendar End Date)
The check dates are start and finish dates within a scope.
The ScopeStart Date needs to be:
less than ScopeEnd Date
less than CalED
greater than or equal to CalSD
both a number and a date
i have tried using:
=AND(ISNUMBER(D13),OR(D13<E13,NOT(ISNUMBER(E13))),D13>=CalSD,D13<CalED,LEFT(CELL("format",D13),1)="D")
However it appears to not like the OR section. if the date in E13 is missing then D13 is not < E13 and so the validation no longer works if the date d13>CalED for instance.
when there are two dates the validation works fine, or if I remove that section it works fine. but then there is nothing to check that the start is before the end scope date.
Hope all that makes sense?
Cheers
JontyR

Excel: Get the days delayed from Start date to End date Using DatedIF?

I have a sample data here that I want to get the days delayed.
As you can see,
The data shows the records for those users who did not submit their project, users who submitted on-time, and users who actually dont submit their project.
Currently,
I have this formula
=DATEDIF(A2,B2,"d")
for the first row to calculate the days delayed of first row.
Can I add in this formula that detects if the user dont submit their project and the delayed days continues counting for day delayed? Like for example the data on row 4. The column submitted_project is blank means the user still dont submit their project the days delayed will start counting after the deadline.
You don't need DateDif for that. (By the way it's Date-Dif for "date difference", not Dated-If)
You can simply subtract the two dates from each other and format the result as a number.
DateDif expects the earlier date as the first parameter, that's why it errors when the first parameter is the later date, i.e. when the project was submitted before the due date.
But with simple subtraction like =B2-A2 you can get the correct result. Better even, to check that both cells have dates before doing the calculation, to avoid misleading results, so
=if(count(A2:B2)=2,B2-A2,"")
Edit after comment: Yes.
=IF(COUNT(A5:B5)=2,B5-A5,IF(B5="",TODAY()-A5))

Excel - Bi-Weekly Tasks - Fill Calendar

I have a Task month calendar. when i change the month of the calendar it shows me what I have to do which day of the month.
I basically have a list of task, when i change the month the tasks date automatically change accordingly a series of rules and that list will populate the calendar.
Calendar
Tasks
But I have some tasks that are bi-weekly, and I dont have a specific week to be done, they have to be done in the fortnight after the last time.
so I have the first week (day) that the task was done and i have the first day of the month i am... and with that i would wanted to know which days of the month i have to do that specific task.
Can you help me?
use the last reference point as the basis for creating the next due date. this would be the date the task was last performed. If it is due a fortnight from that last date then add 14 days. You may want to record the date that task was performed each time so that your formula is based on the date it was last completed each time it is calculated.
If you are wanting to plan ahead then make an assumption that it will be done in consistent 14 day iterations then build your formula to consider the actual date it was completed to readjust the plan going forward. So it will assume this will be done consistently until advised otherwise with an actual date it was last completed.
The trick is to get the first date in the month that matches the weekday of the last date and then you can easily add 14 days. Much like finding the first Monday/Sunday in a month to build a calendar.
A1 contains the last time the task was performed
C1 contains the 1st of the month
C1+7-WEEKDAY(C1+7-weekday(A1))
will return the next weekday that matches the weekday the task was last performed.
=C1+7-WEEKDAY(C1+7-weekday(A1))-A1
returns the number of days since
=(C1+7-WEEKDAY(C1+7-weekday(A1))-A1)/2
returns the number of days divided by 2. If this result is not a whole number (#.5) then it's not in the bi-weekly cycle and we need to add another 7 days to get the correct start date. If it is a whole number then it is our start date. We can use the mod function to find out if there is a decimal value.
=if(mod((C1+7-WEEKDAY(C1+7-weekday(A1))-A1)/2,1)>0,C1+7-WEEKDAY(C1+7-weekday(A1))+7,C1+7-WEEKDAY(C1+7-weekday(A1)))
Below or next to this cell you can simply reference the cell and add 14 =D1+14 and then add as many as you want to display.

Resources