Forum Discussion
Time reset new date
- Jul 25, 2020
The answer to your question is a definitive "Yes"
For example, if your days are in column A, and A5 starts a new day (i.e., isn't the same as A4) then this formula will set B5 to 9:00 a.m.
=IF(A5<>A4,TIME(9,0,0))
But it would help me or somebody else here give a more, uh, detailed answer if you gave a little more details on how your spreadsheet is laid out.
Ideally, post a copy of the spreadsheet itself (without any confidential info).
I'm using the spreadsheet to populate a calendar. Column A is the address, B is start date, C is End date, D start time, E is End time.
- mathetesJul 26, 2020Silver Contributor
A more specifically Excel-Time based way to do that is
=D1+TIME(,30,)
In that way you could easily change your intervals to any increment of minutes desired.The syntax is
TIME(hours,minutes,seconds)(I read yesterday that one of the US Presidents, trained as an engineer and fanatical for efficiency, set his meeting calendar up for 8 minute intervals. Of course, 60 minutes don't divide into 8 minute intervals; so maybe he had a four minute break in there each hour)
- DalehabJul 27, 2020Copper ContributorHi mathetes,
I've attached an example of the spreadsheet, the time formula is great, however, I can't get the IF formula to work, not sure what I am doing wrong? 🤦- mtarlerJul 27, 2020Silver Contributor
Dalehab Starting in cell D3 you want to paste the formula:
=IF(B3<>C2,TIME(9,,),E2)
Note: this puts in an Excel Date/Time value that is equivalent to 0 days and then only the time/hours. You could combine the Time values with the Start Date and End Date (is the End Date ever different than the Start Date?). It all depends on what you want to do with the data and which might be easier for calculations down the line (if any).