Vicky,
Changed: If cell.Value <> Empty Then
To: If cell.Value <> Empty Or cell.Value = 0 Then
Seems to work for me.
VB:Private Sub Worksheet_Change(ByVal Target As Range) Dim cell As Range If Not Intersect(Target, Sheets("raw data").Range("A3:A65536")) Is Nothing Then For Each cell In Target If cell.Value <> Empty Or cell.Value = 0 Then cell.Offset(0, 5).Formula = "=" & cell.Address(False, False) Else cell.Offset(0, 5).ClearContents End If Next cell End If If Not Intersect(Target, Sheets("raw data").Range("B3:B65536")) Is Nothing Then For Each cell In Target If cell.Value <> Empty Or cell.Value = 0 Then cell.Offset(0, 5).Formula = "=" & cell.Offset(-1, 5).Address(False, False) & "*(1+" & cell.Address(False, False) & ")" Else cell.Offset(0, 5).ClearContents End If Next cell End If If Not Intersect(Target, Sheets("raw data").Range("C3:C65536")) Is Nothing Then For Each cell In Target If cell.Value <> Empty Or cell.Value = 0 Then cell.Offset(0, 5).Formula = "=" & cell.Offset(-1, 5).Address(False, False) & "*(1+" & cell.Address(False, False) & ")" Else cell.Offset(0, 5).ClearContents End If Next cell End If If Not Intersect(Target, Sheets("raw data").Range("D3:D65536")) Is Nothing Then For Each cell In Target If cell.Value <> Empty Or cell.Value = 0 Then cell.Offset(0, 5).Formula = "=" & cell.Offset(-1, 5).Address(False, False) & "*(1+" & cell.Address(False, False) & ")" Else cell.Offset(0, 5).ClearContents End If Next cell End If End Sub
Cheers,
dr



Bookmarks