View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ALEX ALEX is offline
external usenet poster
 
Posts: 493
Default assigning formula to a target column

When I have only one target column it's working well:

If (Target.Column < 8) Then Exit Sub
If Target.Cells.Count 8 Then Exit Sub
Application.EnableEvents = False

With Target(1, 3)
If Target.Value < "" Then
.NumberFormat = "mmm-yy"
.FormulaR1C1 = "=RC[-2]"
Else
.ClearContents
End If
End With

With Target(1, 4)
If Target.Value < "" Then
...
End With

But, when I'm trying to use one more (the first) target column it's not
working:
If (Target.Column < 8) Or (Target.Column < 1) Then Exit Sub 'here it goes
to exit
If Target.Cells.Count 8 Then Exit Sub ' don't know how to handle with this
as well
Application.EnableEvents = False
....

How could I do it?

Thanks
'If Target.Column = 8 Then