bobbyexcel
Board Regular
- Joined
- Nov 21, 2019
- Messages
- 88
- Office Version
- 365
- Platform
- Windows
Could someone please help me on my below issue..
I want to mention the Final status of each job in Column G based on the below condition of the Job Status..
Dim lastrow As Integer
Dim timeRng As Range
Set timeRng = sws.Range("L2:L" & lastrow)
lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
TimeSer = TimeSerial(16, 30, 0) ' constant 04:30:00PM later used to create min and max datetime values
For Each Cell In timeRng
If Cell.Value < TimeSer Then
Range("G" & Cell.Row) = Range("B" & Cell.Row)
End If
Next Cell
I want to mention the Final status of each job in Column G based on the below condition of the Job Status..
- Job should run between 8PM to next Day 3PM.
- The closest to 3PM would be the Final status of the Job
- Final Status should apply to all Jobs in that Particular "Start Date".
Dim lastrow As Integer
Dim timeRng As Range
Set timeRng = sws.Range("L2:L" & lastrow)
lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
TimeSer = TimeSerial(16, 30, 0) ' constant 04:30:00PM later used to create min and max datetime values
For Each Cell In timeRng
If Cell.Value < TimeSer Then
Range("G" & Cell.Row) = Range("B" & Cell.Row)
End If
Next Cell