LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Dave Peterson
 
Posts: n/a
Default

I think I would modify your and Bob's code slightly:

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range
Dim myRng As Range

Set myRng = Nothing
On Error Resume Next
Set myRng = Intersect(Target, Me.Range("a:a"))
On Error GoTo 0

If myRng Is Nothing Then Exit Sub

On Error GoTo errHandler:

For Each cell In myRng.Cells
If IsNumeric(cell.Value) Then
If cell.Value 5 Then
Application.EnableEvents = False
cell.Offset(0, 3).Value = "item1"
End If
End If
Next cell

errHandler:
Application.EnableEvents = True

End Sub

Now if you paste in A1:X99, only the cells in column A are looked at.





wrote:

It really works.
THANK YOU BOB!!!


--

Dave Peterson
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"