Hello All,
I have:
This code works well to gain my times for a second shift of 4:30PM to 3:30AM the following day (cross over midnight to the next day)
I need to change this code, to only pick up Mon, Tue, Wed, Thu, days, where Column S has all the days listed.
So I've tried:
this is not working, is there a way to incorporate the code to only see Mon - Thu and leave out Fri -Sun?
Thank you
I have:
VBA Code:
ActiveCell.Formula = "=IF(OR($D$2=$B4,$E$2=$B4),$G4, IF(MEDIAN($D$2,$E$2,$B4)=$B4,IF($D$2<$E$2,$G4,""""),IF($E$2<$D$2,$G4,""-"")))"
I need to change this code, to only pick up Mon, Tue, Wed, Thu, days, where Column S has all the days listed.
So I've tried:
Code:
Range("Q4").Select
ActiveCell.Formula = "=IF(OR($D$2=$B4,$E$2=$B4),$G4, IF(MEDIAN($D$2,$E$2,$B4)=$B4,IF($D$2<$E$2,$G4,""""),IF($E$2<$D$2,$G4,""-""))*OR($S4=""Mon"",$S4=""Tue"",$S4=""Wed"",$S4=""Thu""),$G4,""""))"
Selection.AutoFill Destination:=Range("Q4:Q" & Range("A" & Rows.Count).End(xlUp).Row)
Range(Selection, Selection.End(xlDown)).Select
this is not working, is there a way to incorporate the code to only see Mon - Thu and leave out Fri -Sun?
Thank you