View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default macro restricted to one column

Private Sub Worksheet_Change(ByVal Target As Range)
if target.cells.count 1 then exit sub 'only one cell at a time
if intersect(target,me.range("a:a")) is nothing then exit sub

if lcase(target.value) = "w" then
me.cells(target.row,"I").select
end if
end sub



davemon wrote:

I have the following macro, but I would like to run only when a "w" is
entered in any cell in column A.
Private Sub Worksheet_Change(ByVal Target As Range)
If ActiveCell.Value = "w" Then
Range("I" & ActiveCell.Row).Select
End If
End Sub

Thanks in advance for the help!!!


--

Dave Peterson