Automatic date calculation

catalincirjan

New Member
Joined
Aug 28, 2020
Messages
18
Office Version
  1. 2016
Platform
  1. Windows
Hello,

I have a table that I want some people to fill in. The last column is called "Submission date" and I want this to be automatically calculate.

Trigger: When they (start to)complete a row in the table
Rule for calculation:
  • If that persons input is before the established cutover date - same day
  • If that persons input is after the established cutover date - next business day // I will accept that it will not be able to distinguish holydays and such, but the probabilty of somebody introducing something before a holiday is very unlikely

My attempt of a solution: =IF(A2<>"",IF(HOUR(NOW())<3,TODAY(),IF(WEEKDAY(TODAY(),2)=5,TODAY()+3,TODAY()+1)),"")
Reasoning:
Now()<3 -> is the cutover date with correction for timezone when I uplod this to Sharepoint ( although I am UTC+3, once on sharepoint I guess it takes the timezon of the server - America?!)
Today()+3 -> in case it's a Friday the result will be Monday

Other details: Before I upload this file, I want to protect that specific column so that people can't 'overwrite' / 'forge' the submission date
Issue: I used Power Automate to send an automaticaly report each day.
it appears that anytime I open the excel it (or the power flow runs), the formula recalculates the submission date. So if person X would have writen something last week, when I open now the excel it will show

I have tried to go to Formula -> Calculation Options -> Manual // this almost works -> when I edit the file after cutover hour, the old entries remain with the old date ... until I save .... which changes all the dates again
Also, the Manual Calculation is not an option due to the fact specified in Other details: once protected I can no click in the formula of that cell and press enter

Any suggestions, please?
 

Attachments

  • image001.png
    image001.png
    16.4 KB · Views: 10

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

mole999

Well-known Member
Joined
Oct 23, 2004
Messages
10,524
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows
you probably really need to use VBA to set the value once only, as you have found =Now() just changes
 

catalincirjan

New Member
Joined
Aug 28, 2020
Messages
18
Office Version
  1. 2016
Platform
  1. Windows
Hmmm the issue with VBA is that I have zero experience, I am not even sure if I can upload it to Sharepoint because I think they don't accept macros in the online version ...
 

Forum statistics

Threads
1,148,379
Messages
5,746,364
Members
424,010
Latest member
MrSullings

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top