View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Gunti Gunti is offline
external usenet poster
 
Posts: 58
Default Questing regarding Date Stamp

Hi,

I need a cell (U) to display the current date (and keep it) everytime i
change something in row W.
I found the following code:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("W2:W9999"), .Cells) Is Nothing Then
Application.EnableEvents = False
With .Offset(0, 1)
.NumberFormat = "dd mmm yyyy"
.Value = Date
End With
Application.EnableEvents = True
End If
End With
End Sub

I've got one main question, can i change this formula to also activate when
a formula value changes? (Let's say W2 is IF(A1="";"Empty";"Not Empty")

Now when i enter something in A1, W2 should change from Empty to Not Empty.
The Date Stamp code, however, does not see this as a change in the cell.. Is
there any way to solve this?

Greets & Thanks,
gunti