Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
dumbest question that will be posted all day, but here goes anyway.
How do I change the following macro so that it only applies to one column instead of two? I don't know how to properly modify Range(Cells(Target.Row, 15), Cells(Target.Row, 16)) to just one of those columns. Deleting the second "range" gives me a run-time error. Maybe I should be using something all together different anyway. When the user enters a value into Column 14, I want the word "Subfile" to appear in Column 15; however, if the user deletes the text in Column 14, I want "Subfile" removed/deleted. Any and all help is always appreciated. Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False If Target.Column = 14 And Target.Value < "" Then Range(Cells(Target.Row, 15), Cells(Target.Row, 16)).Value = "Subfile" End If If Target.Column = 14 And Target.Value = "" Then Range(Cells(Target.Row, 15), Cells(Target.Row, 16)).Value = "" End If Application.EnableEvents = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I change a Worksheet_change event to a beforesave event? | Excel Programming | |||
Change event on single cell fires many times | Excel Programming | |||
Worksheet change event-single column | Excel Programming | |||
MsgBox in Enter event causes combobox not to run Change event | Excel Programming | |||
How to trap delete row event and hide column event? | Excel Programming |