Değerli hocam, kod sorununu deneme yanılma yöntemiyle aşağıdaki şekilde çözdük
Rehberlik ve kılavuzluk ettiğiniz çok teşekkür ederim.
Public secim
Private Sub Worksheet_Change(ByVal Target As Range)
If ((Target.Row - 1) Mod 33) = 0 Or Target.Row > 4950 Then Exit Sub 'BAŞLIK ve SON SATIR
If ((Target.Row - 1) Mod 33) = 31 And Target.Column = 4 Then 'İSKONTO
Cells(Target.Row, 3).NumberFormat = "dd mmm": Cells(Target.Row, 3).ClearContents
If Target.Value <> 0 Then Cells(Target.Row, 3) = Date
Exit Sub
End If
If Target.Column = 6 Then
Application.ScreenUpdating = False
Columns("BE:BE").Select
Selection.Find(What:=Target.Offset(0, 1).Value, LookIn:=xlValues).Select
Target.Cells(1, 1).Offset(0, 3).Value = Range(ActiveCell.Address).Offset(0, 3).Value
Target.Cells(1, 1).Offset(0, 4).Value = Range(ActiveCell.Address).Offset(0, 1).Value
Target.Offset(0, 0).Select
Application.ScreenUpdating = True
End If
If Target.Column = 11 Then
Application.ScreenUpdating = False
Columns("BE:BE").Select
Selection.Find(What:=Target.Offset(0, 1).Value, LookIn:=xlValues).Select
Target.Cells(1, 1).Offset(0, 3).Value = Range(ActiveCell.Address).Offset(0, 3).Value
Target.Cells(1, 1).Offset(0, 4).Value = Range(ActiveCell.Address).Offset(0, 1).Value
Target.Offset(0, 0).Select
Application.ScreenUpdating = True
End If
If Target.Column = 16 Then
Application.ScreenUpdating = False
Columns("BE:BE").Select
Selection.Find(What:=Target.Offset(0, 1).Value, LookIn:=xlValues).Select
Target.Cells(1, 1).Offset(0, 3).Value = Range(ActiveCell.Address).Offset(0, 3).Value
Target.Cells(1, 1).Offset(0, 4).Value = Range(ActiveCell.Address).Offset(0, 1).Value
Target.Offset(0, 0).Select
Application.ScreenUpdating = True
End If
If Target.Column = 21 Then
Application.ScreenUpdating = False
Columns("BE:BE").Select
Selection.Find(What:=Target.Offset(0, 1).Value, LookIn:=xlValues).Select
Target.Cells(1, 1).Offset(0, 3).Value = Range(ActiveCell.Address).Offset(0, 3).Value
Target.Cells(1, 1).Offset(0, 4).Value = Range(ActiveCell.Address).Offset(0, 1).Value
Target.Offset(0, 0).Select
Application.ScreenUpdating = True
End If
If Target.Column = 26 Then
Application.ScreenUpdating = False
Columns("BE:BE").Select
Selection.Find(What:=Target.Offset(0, 1).Value, LookIn:=xlValues).Select
Target.Cells(1, 1).Offset(0, 3).Value = Range(ActiveCell.Address).Offset(0, 3).Value
Target.Cells(1, 1).Offset(0, 4).Value = Range(ActiveCell.Address).Offset(0, 1).Value
Target.Offset(0, 0).Select
Application.ScreenUpdating = True
End If
If Target.Column = 31 Then
Application.ScreenUpdating = False
Columns("BE:BE").Select
Selection.Find(What:=Target.Offset(0, 1).Value, LookIn:=xlValues).Select
Target.Cells(1, 1).Offset(0, 3).Value = Range(ActiveCell.Address).Offset(0, 3).Value
Target.Cells(1, 1).Offset(0, 4).Value = Range(ActiveCell.Address).Offset(0, 1).Value
Target.Offset(0, 0).Select
Application.ScreenUpdating = True
End If
If Target.Column = 36 Then
Application.ScreenUpdating = False
Columns("BE:BE").Select
Selection.Find(What:=Target.Offset(0, 1).Value, LookIn:=xlValues).Select
Target.Cells(1, 1).Offset(0, 3).Value = Range(ActiveCell.Address).Offset(0, 3).Value
Target.Cells(1, 1).Offset(0, 4).Value = Range(ActiveCell.Address).Offset(0, 1).Value
Target.Offset(0, 0).Select
Application.ScreenUpdating = True
End If
If Target.Column = 41 Then
Application.ScreenUpdating = False
Columns("BE:BE").Select
Selection.Find(What:=Target.Offset(0, 1).Value, LookIn:=xlValues).Select
Target.Cells(1, 1).Offset(0, 3).Value = Range(ActiveCell.Address).Offset(0, 3).Value
Target.Cells(1, 1).Offset(0, 4).Value = Range(ActiveCell.Address).Offset(0, 1).Value
Target.Offset(0, 0).Select
Application.ScreenUpdating = True
End If
If Target.Column = 46 Then
Application.ScreenUpdating = False
Columns("BE:BE").Select
Selection.Find(What:=Target.Offset(0, 1).Value, LookIn:=xlValues).Select
Target.Cells(1, 1).Offset(0, 3).Value = Range(ActiveCell.Address).Offset(0, 3).Value
Target.Cells(1, 1).Offset(0, 4).Value = Range(ActiveCell.Address).Offset(0, 1).Value
Target.Offset(0, 0).Select
Application.ScreenUpdating = True
End If
If Target.Column = 51 Then
Application.ScreenUpdating = False
Columns("BE:BE").Select
Selection.Find(What:=Target.Offset(0, 1).Value, LookIn:=xlValues).Select
Target.Cells(1, 1).Offset(0, 3).Value = Range(ActiveCell.Address).Offset(0, 3).Value
Target.Cells(1, 1).Offset(0, 4).Value = Range(ActiveCell.Address).Offset(0, 1).Value
Target.Offset(0, 0).Select
Application.ScreenUpdating = True
End If
If ((Target.Column - 1) Mod 5) <> 0 Or Target.Column > 51 Then Exit Sub ' MİKTAR SÜTUNLARI
Application.EnableEvents = False
ilk = Int(Target.Row / 34) * 33 + 7: son = ilk + 21
If Target.Offset(0, 1) = "" Or Target.Offset(0, 1) = 0 Then
MsgBox "ÖNCE ÜRÜN SEÇİMİ YAPINIZ !", vbCritical
Target.ClearContents: GoTo 10
End If
bul = 0
For s = ilk To son
bak = Cells(s, 2)
If bak = secim Then: bul = s: Exit For
Next
If bul > 0 And Target = Empty Then
Range("A" & bul & ":D" & bul).ClearContents
Range("A" & bul).Resize(son - bul, 4) = Range("A" & bul + 1 & ":D" & son).Value
Range("A" & son & ":D" & son).ClearContents
If bul = ilk And Cells(ilk, 1) = "" Then Cells(ilk - 2, 1).ClearContents: Cells(ilk - 2, 2).ClearContents
GoTo 10
ElseIf bul > 0 And Not Target = Empty Then
Cells(bul, 1) = Target.Value: Cells(bul, 3) = Target.Offset(0, 2)
Cells(bul, 4) = Target.Value * Cells(bul, 3): GoTo 10
End If
If ((Target.Column - 1) Mod 5) = 0 And Not IsNumeric(Target.Value) Then
MsgBox "SADECE SAYI YAZILABİLİR", vbCritical
Target.ClearContents: Target.Activate
ElseIf WorksheetFunction.CountBlank(Range("A" & ilk & ":A" & son)) = 0 Then
MsgBox "SEPET DOLDU ! SONRAKİ SAYFADAN DEVAM EDİNİZ !", vbCritical
Target.ClearContents: Target.Activate: GoTo 10
Else
XD = Cells(son + 1, 1).End(3).Row + 1
If ilk = XD Then: Cells(ilk - 2, 1).NumberFormat = "h:mm": Cells(ilk - 2, 1) = Time: Cells(ilk - 2, 2) = Date
Cells(XD, 1) = Target.Value: Cells(XD, 2) = Target.Offset(0, 1)
Cells(XD, 3) = Target.Offset(0, 2): Cells(XD, 4) = Target.Offset(0, 2) * Target.Value
End If
10: Application.EnableEvents = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column < 6 Or Target.Column > 51 Or Target.Row > 4950 Or ((Target.Column - 1) Mod 5) <> 0 Then Exit Sub
If Selection.Count > 1 Then Exit Sub
secim = Target.Offset(0, 1)
End Sub