Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jay
 
Posts: n/a
Default 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   Report Post  
Kevin
 
Posts: n/a
Default

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   Report Post  
Kevin
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date updates from worksheet to chart & changes date to a date series! Help!! Jayjg Charts and Charting in Excel 2 January 22nd 05 03:00 PM
Date issue between Windows and Macintosh version dlg1967 Excel Discussion (Misc queries) 4 January 19th 05 03:51 PM
How do I stop today() from updating date on saved spreadsheets? lionmark Excel Discussion (Misc queries) 2 January 4th 05 01:03 AM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 02:06 AM
Using formulas to determine date in one cell based on date in anot Gary Excel Worksheet Functions 2 November 22nd 04 08:11 AM


All times are GMT +1. The time now is 05:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"