Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / November 2007

Tip: Looking for answers? Try searching our database.

How to do it on excel?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eric - 17 Nov 2007 04:32 GMT
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
OssieMac - 17 Nov 2007 04:51 GMT
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"))

Signature

Regards,

OssieMac

> Private Sub Worksheet_Change(ByVal Target As Range)
> Set r = Range("A1:C1")
[quoted text clipped - 9 lines]
> Thank everyone for any suggestions
> Eric
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.