Syntax error

S

Steved

Hello from Steved

The below works
If Application.Intersect(Target, Range("B2:B500")) Is Nothing Then

I would like to run it in a second column also, the below gives me an Syntax
error

If Application.Intersect(Target, Range({"B2:B500","F2:F500"})) Is Nothing Then

Please what is required for the code to reconize Col B:B and F:F Thankyou.
 
C

Chip Pearson

I think you want

If Application.Intersect(Target, Range("B2:B500,E2:E500")) Is Nothing Then

not

If Application.Intersect(Target, Range({"B2:B500","F2:F500"})) Is Nothing
Then



--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
S

Steved

Thankyou Chip.

Chip Pearson said:
I think you want

If Application.Intersect(Target, Range("B2:B500,E2:E500")) Is Nothing Then

not

If Application.Intersect(Target, Range({"B2:B500","F2:F500"})) Is Nothing
Then



--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 

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