haijaggu143
New Member
- Joined
- Jan 23, 2019
- Messages
- 4
Hi all,
Please help to run this formula if the day in cell C2 value is saturday
Range("F2").Formula = "=IF(AND(D2>=TIME(9,16,0),D2<=TIME(11,59,0)),D2-TIME(9,0,0),IF(AND(D2>=TIME(14,16,0),D2>=TIME(12,00,0)),D2-TIME(14,0,0)*1,0))"
and if Cell C2 value is Sunday to Friday
Range("F2").Formula = "=IF(AND(D2>=TIME(8,16,0),D2<=TIME(10,30,0)),D2-TIME(8,0,0),IF(AND(D2>=TIME(12,16,0),D2>=TIME(10,31,0)),D2-TIME(12,0,0)*1,0))"
Until the last row which has data in the sheet.
In short check the value in C2, if = saturday formula 1 or formula 2.
Thanks in advance
Jagadeesh Balakrishnan
Please help to run this formula if the day in cell C2 value is saturday
Range("F2").Formula = "=IF(AND(D2>=TIME(9,16,0),D2<=TIME(11,59,0)),D2-TIME(9,0,0),IF(AND(D2>=TIME(14,16,0),D2>=TIME(12,00,0)),D2-TIME(14,0,0)*1,0))"
and if Cell C2 value is Sunday to Friday
Range("F2").Formula = "=IF(AND(D2>=TIME(8,16,0),D2<=TIME(10,30,0)),D2-TIME(8,0,0),IF(AND(D2>=TIME(12,16,0),D2>=TIME(10,31,0)),D2-TIME(12,0,0)*1,0))"
Until the last row which has data in the sheet.
In short check the value in C2, if = saturday formula 1 or formula 2.
Thanks in advance
Jagadeesh Balakrishnan