Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [D4]) Is Nothing Then GoTo 10
Application.ScreenUpdating = False
[C5:E20,H5:H20].ClearContents
With [C5:C20].Validation
.Delete
If Target = "" Then GoTo son
If Target = "FLANŞLI İSKELE" Then
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=flanş"
ElseIf Target = "GÜVENLİK İSKELE" Then
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=güvenlik"
ElseIf Target = "MASA İSKELE" Then
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=masa"
Else
GoTo son
End If
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
sut = WorksheetFunction.Match(Target, Sheets("veri").[B1:G1], 0) + 1
son = Sheets("veri").Cells(Rows.Count, sut).End(3).Row
a = 5
For i = 2 To son
Cells(a, "C") = Sheets("veri").Cells(i, sut)
Cells(a, "G") = Sheets("veri").Cells(i, sut + 1)
a = a + 1
Next
[C5].Select
son:
Application.ScreenUpdating = True
10:
If Intersect(Target, [C5:C20]) Is Nothing Then GoTo 20
Target.Offset(0, 1).Select
20:
If Intersect(Target, [E5:E20]) Is Nothing Then Exit Sub
Target.Offset(0, 3).Select
End Sub