Hi Everyone,
I am having trouble with inserting my formula that has quote marks. My formula below worked well when I manually inserted it in a cell on a worksheet but not in vba.
The code I worked with is this:
I had tried double quote too but it didnt work or maybe there is something I missed.
Please help out as I am totally stuck.
I am having trouble with inserting my formula that has quote marks. My formula below worked well when I manually inserted it in a cell on a worksheet but not in vba.
The code I worked with is this:
Code:
With ActiveCell
.Offset(0, 4) = Range("E5:E" & LastRow).Formula = "==IF(TIMEVALUE(LEFT(B5,LEN(B5)-2)&":"&RIGHT(B5,2))<TIME(14,0,0),TIMEVALUE(LEFT(B5,LEN(B5)-2)&":"&RIGHT(B5,2))+1-(14/24),TIMEVALUE(LEFT(B5,LEN(B5)-2)&":"&RIGHT(B5,2))-(14/24))"
End With
I had tried double quote too but it didnt work or maybe there is something I missed.
Please help out as I am totally stuck.