PDA

View Full Version : conditional column range



wilg
01-10-2012, 03:21 PM
I have the below which allows code to run if activecell is in column a...

ActiveCell.Column <> 1

I want to use add other columns but dont know how to adapt eg...

ActiveCell.Column <> 1,5,8,11 etc...

any suggestions?

Bob Phillips
01-11-2012, 02:18 AM
Try


If Not (IsError(Application.Match(ActiveCell.Column, Array(1, 5, 8, 11), 0))) Then