PDA

View Full Version : VB Formula Assistance needed



DAWG2006
05-01-2009, 11:59 AM
Sub MyFormulas()
With Range("E")
.Formula = "=IF(AND(A2<>"""",B2<>"""",C2<>"""",D2<>""""),TEXT(NOW(),""h:mm AM/PM""), """")"
.Value = .Value
End With
End Sub


I'm looking to have a time stamp in column E, but only when cells A2:D2 (A3:D3, etc.) equal data I want the time stamp to show.

Bob Phillips
05-01-2009, 12:13 PM
You need a proper range



Sub MyFormulas()
With Range("E2:E20")
.Formula = "=IF(AND(A2<>"""",B2<>"""",C2<>"""",D2<>""""),TEXT(NOW(),""h:mm AM/PM""), """")"
.Value = .Value
End With
End Sub

DAWG2006
05-01-2009, 12:48 PM
Can this be done, if it can how do I go about doing it.

Bob Phillips
05-01-2009, 02:40 PM
I did it.