Syntax error

  • Thread starter Thread starter Steved
  • Start date Start date
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.
 
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)
 
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)
 
Back
Top