How to reference multipal cells in VBA

M

mikewild2000

I am using
If Target.Address="$C$11" Then

blah blah, etc

But how do i select a group of cells?

I have tried:
if target.address = "$C$11":"$J$11" which just errors,
i have tried various other methods.

Can anybody help with this solution?
Nothing in help
 
B

Bob Phillips

Mike,

Try a slightly different approach

If Not Intersect(Target,Range("C11:J11")) Is Nothing Then
....

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
M

mikewild2000

Thank bob - works a treat.

I was working at the formula for about an hour, and experience tells m
to ask rather than let it spill over for days
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top