Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excuting marco on entering data into a field
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/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excuting marco on entering data into a field
Use the worksheet change event
Test for the condition see Chip Pearson's page on events http://www.cpearson.com/excel/events.htm -- Regards, Tom Ogilvy "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/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Trigger a Date & Time stamp by entering data in another field... | Excel Worksheet Functions | |||
how do you set up a field to flash upon entering sheet | Excel Worksheet Functions | |||
Pivot Field in Field List but Not Source Data | Excel Discussion (Misc queries) | |||
Excel's Marco Convert data to Access | Excel Programming | |||
write marco to put data from sheet to memory | Excel Programming |