1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 1 Then
Exit Sub
Else
Select Case Target.Value
Case "x"
lgn = Target.Row
Range("zaza").Select
Selection.Copy
Range("g" & lgn).Select
Selection.PasteSpecial Paste:=xlFormulas, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
With Range(Cells(Target.Row, 3), Cells(Target.Row, 36)).Interior
.ColorIndex = 15
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Case Else
With Range(Cells(Target.Row, 3), Cells(Target.Row, 36)).Interior
.ColorIndex = xlNone
End With
Range(Cells(Target.Row, 7), Cells(Target.Row, 36)).ClearContents
End Select
End If
End Sub |