Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to do it on excel?
Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Range("A1:C1") If Intersect(r, Target) Is Nothing Then Exit Sub Application.EnableEvents = False r.Value = Target.Value Application.EnableEvents = True End Sub I would like to target on specific cells rather than range. Could anyone tell me how to modify Range("A1:C1") into different cells? such as A13, A67, A100. Thank everyone for any suggestions Eric |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to do it on excel?
Hi Eric,
Set r = Union(Cells(13, 1), Cells(67, 1), Cells(100, 1)) or Set r = Union(Range("A13"), Range("A67"), Range("A100")) or Set r = Union(Range("A13:A15"), Range("A67:A70"), Range("A100")) -- Regards, OssieMac "Eric" wrote: Private Sub Worksheet_Change(ByVal Target As Range) Set r = Range("A1:C1") If Intersect(r, Target) Is Nothing Then Exit Sub Application.EnableEvents = False r.Value = Target.Value Application.EnableEvents = True End Sub I would like to target on specific cells rather than range. Could anyone tell me how to modify Range("A1:C1") into different cells? such as A13, A67, A100. Thank everyone for any suggestions Eric |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|