View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Larry Cooke Larry Cooke is offline
external usenet poster
 
Posts: 8
Default Tracking newly entered rows.

Currently I have a sheet which contains data in columns A-Q, I have added
some code in WorkSheet_Change to track any changes in the existing data, this
same code is currently telling me that a newly entered row of data has been
changed which is technically correct but I'd rather have it tell me that the
row is a new row rather than changed. Code I'm using is:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim iRow As Integer
If Not Intersect(Target, Range("A:Q")) Is Nothing Then
iRow = Target.Row
Cells(iRow, 19).Value = "Changed!"
End If
End Sub

Currently this puts "Changed!" in column S, if any new code means using yet
another column that would be okay too. It would be cool if it remained in
the same column though.

Ideas or suggestions?

Thanks,

Larry