View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Excuting marco on entering data into a field

Hi Paul,

Here's some code

Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False
On Error GoTo ws_exit
If Target.Column = 7 Then
If LCase(Target.Value) = "cancelled" Then
Cells(Target.Row, "N").Resize(1, 7).Value = "NA"
End If
End If

ws_exit:
Application.EnableEvents = True
End Sub

Put it in the workshneet module (right-click the sheet name tab, click View
Code, and paste the code).

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"pauluk " wrote in message
...
Hi,

Is there any way that i can excute a macro form entering data into a
field?

i.e. upon entering the word cancelled in to a cell in column G the
cells for that row in columns N to T automaticlly filled with N/A

I have used the the lookup formula but i need it as a macro

Regards
Paul


---
Message posted from http://www.ExcelForum.com/