Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
More Efficient If Statement
I have the following code as part of a macro. Is there a more efficient (i.e.
less code) way of writing this IF statement? Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False If Target.Address = "$G$9" Or Target.Address = "$G$10" Or _ Target.Address = "$G$11" Or Target.Address = "$G$12" Or _ Target.Address = "$G$13" Or Target.Address = "$G$17" Or _ Target.Address = "$G$18" Or Target.Address = "$G$19" Or _ Target.Address = "$G$20" Or Target.Address = "$G$21" Or _ Target.Address = "$G$25" Or Target.Address = "$G$26" Or _ Target.Address = "$G$27" Or Target.Address = "$G$28" Or _ Target.Address = "$G$29" Then ........................ TIA. -- Ken Hudson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
More Efficient IF | Excel Programming | |||
More Efficient IF | Excel Programming | |||
Is there a more efficient way to do this? | Excel Programming | |||
More efficient way? | Excel Programming | |||
Q: Is this vlookup statement efficient? | Excel Programming |