Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Roll back to previous date
I need to roll back the values of the second 12 hour shift which is from 7:00
P.M. to 6:59 A.M. to the previous days date. Example, any production run beginning on the 7:00 P.M. 12 hour shift (on 11-30-04 = cell W11) going past 12:01 A.M and ending at or prior to 6:59 A.M 12-01-04 belongs to the 11-30-04 date, or ending on 12-01-04 at 3:45 A.M. roll these values back and group it/them into the previous day's (11-30-04) production numbers. Begin production run date and time: W11 = 11-30-04 7:20 P.M ends 11-30-04 10:30 P.M. W11 = 11-30-04 10:31 P.M. ends 12-01-04 12:10 A.M. W11 = 12-01-04 12:11 A.M. ends 12-01-04 3:52 A.M W11 = 12-01-04 3:53 A.M. ends 12-01-04 6:59 A.M I would like all values from 12-01-04 12:01 A.M. to 12-01-04 6:59 A.M. rolled back to the values for 11-30-04. Is this possible? If so how? Show examples please? Thanks |
#2
|
|||
|
|||
Try adding another column for shift start date/time. Otherwise you will need
to test for the time. and if the time is greater to 23:00 and less than 06:59 am then subtract one from the current date. This function should work: =IF(TEXT(A2,"h:mm:ss")"23:59:59",NOW()-1,NOW()) Make sure the field format where this function exists is set to Date or you will get the date serial number. Hope that helps! "Jay" wrote: I need to roll back the values of the second 12 hour shift which is from 7:00 P.M. to 6:59 A.M. to the previous days date. Example, any production run beginning on the 7:00 P.M. 12 hour shift (on 11-30-04 = cell W11) going past 12:01 A.M and ending at or prior to 6:59 A.M 12-01-04 belongs to the 11-30-04 date, or ending on 12-01-04 at 3:45 A.M. roll these values back and group it/them into the previous day's (11-30-04) production numbers. Begin production run date and time: W11 = 11-30-04 7:20 P.M ends 11-30-04 10:30 P.M. W11 = 11-30-04 10:31 P.M. ends 12-01-04 12:10 A.M. W11 = 12-01-04 12:11 A.M. ends 12-01-04 3:52 A.M W11 = 12-01-04 3:53 A.M. ends 12-01-04 6:59 A.M I would like all values from 12-01-04 12:01 A.M. to 12-01-04 6:59 A.M. rolled back to the values for 11-30-04. Is this possible? If so how? Show examples please? Thanks |
#3
|
|||
|
|||
You will have to make that if statment test on the other end as well (06:59:59)
=IF(AND((TEXT(A2,"h:mm:ss")"11:59:59 PM"),(TEXT(A2,"h:mm:ss")<="6:59:59 AM")),NOW()-1,NOW()) "Jay" wrote: I need to roll back the values of the second 12 hour shift which is from 7:00 P.M. to 6:59 A.M. to the previous days date. Example, any production run beginning on the 7:00 P.M. 12 hour shift (on 11-30-04 = cell W11) going past 12:01 A.M and ending at or prior to 6:59 A.M 12-01-04 belongs to the 11-30-04 date, or ending on 12-01-04 at 3:45 A.M. roll these values back and group it/them into the previous day's (11-30-04) production numbers. Begin production run date and time: W11 = 11-30-04 7:20 P.M ends 11-30-04 10:30 P.M. W11 = 11-30-04 10:31 P.M. ends 12-01-04 12:10 A.M. W11 = 12-01-04 12:11 A.M. ends 12-01-04 3:52 A.M W11 = 12-01-04 3:53 A.M. ends 12-01-04 6:59 A.M I would like all values from 12-01-04 12:01 A.M. to 12-01-04 6:59 A.M. rolled back to the values for 11-30-04. Is this possible? If so how? Show examples please? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date updates from worksheet to chart & changes date to a date series! Help!! | Charts and Charting in Excel | |||
Date issue between Windows and Macintosh version | Excel Discussion (Misc queries) | |||
How do I stop today() from updating date on saved spreadsheets? | Excel Discussion (Misc queries) | |||
Addition to Turn cell red if today is greater or equal to date in cell | New Users to Excel | |||
Using formulas to determine date in one cell based on date in anot | Excel Worksheet Functions |