How to tweak this bit of code

MOB

Well-known Member
Joined
Oct 18, 2005
Messages
995
Code:
If Not Intersect(Target, Range("K12:T31")) Is Nothing Then
If I want to change the range to K12:Q31 and S12:T31 - what should I do?

TIA
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
11,747
Office Version
365, 2010
Platform
Windows, Mobile
Try...

Code:
If Not Intersect(Target, Range("K12:Q31,S12:T31")) Is Nothing Then
 

mohadin

Active Member
Joined
Mar 22, 2015
Messages
361
Office Version
2013
Platform
Windows
OR
Code:
If Not Intersect(Target, Union(Range("K12:T31"), Range("S12:T31"))) Is Nothing Then
 

Forum statistics

Threads
1,085,467
Messages
5,383,873
Members
401,859
Latest member
tomahawk61

Some videos you may like

This Week's Hot Topics

Top