LastR.FormulaR1C1 = "=IF(AND(Sheet1!r2c1>=""15:37:00""*1,Sheet1!r2c1<=""15:38:00""*1),""Hello"","""")"
LastR.FormulaR1C1 = "=IF(AND(Sheet1!r2c1>=""15:37<wbr>:00""*1,Sheet1!r2c1<=""15:38<wbr>:00""*1),Sheet1!r2c2,"""")"
.FormulaR1C1 = "=IF(AND(Sheet1!r2c1>=""15:37:00""*1,Sheet1!r2c1<=""15:38:00""*1),""Hello"","""")"
</pre>
I fixed it with
Quote:
<TABLE cellSpacing=0 cellPadding=6 width="100%" border=0><TBODY><TR><TD class=alt2 style="BORDER-RIGHT: 1px inset; BORDER-TOP: 1px inset; BORDER-LEFT: 1px inset; BORDER-BOTTOM: 1px inset">LastR.FormulaR1C1 = "=IF(AND(Sheet1!r2c1>=""15:37:00""*1,Sheet1!r2c1<=""15:38:00""*1),""Hello"","""")" </TD></TR></TBODY></TABLE>
With Sheets("Sheet1").Range("A2")
If.Value >= TimeSerial(21,0,0) AND .Value <= TimeSerial(21,5,0) Then
Do Stuff
End if
End With