View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.newusers
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Formatting cell for state abbreviations

Replace If Target.Column < 1 Then Exit Sub with one of these for
contiguous or non-contiguous columns.

If Intersect(Range(Target(1).Address), _
Range("B:F")) Is Nothing Then Exit Sub


If Intersect(Range(Target(1).Address), _
Range("B:B, F:F, I:I, L:L")) Is Nothing Then Exit Sub


Gord

On Tue, 14 Apr 2009 11:23:01 -0700, Hile
wrote:

Thank you so much. Can I use a range of columns if I want to apply this
format to more than 1 column on the sheet? If so, do I enclose in () and
separate with commas?