tahsinanarat
Altın Üye
- Katılım
- 14 Mart 2005
- Mesajlar
- 2,181
- Excel Vers. ve Dili
- Ofis 2019 Türkçe
Kod:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Dim hcr As Range, syf As Integer
If Intersect(Target, Range("c:c")) Is Nothing Then Exit Sub
If Target = "" Then Exit Sub
Set hcr = Sheets("STOK").Cells.Find(Target, lookat:=xlWhole)
If Not hcr Is Nothing Then
Sheets("STOK").Select
hcr.Select
End If
Set hcr = Nothing
End Sub
---------------------------------
Kod:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim BUL As Range
On Error GoTo Son
If Intersect(Target, Range("I2:I65536")) Is Nothing Then Exit Sub
If Target = "" Then
Else
Set BUL = Sheets("database").Range("L:L").Find(Target)
If Not BUL Is Nothing Then
Target.Offset(0, -6).Value = BUL.Offset(0, -11).Value
Target.Offset(0, -5).Value = BUL.Offset(0, -9).Value
Target.Offset(0, -4).Value = BUL.Offset(0, -2).Value
Target.Offset(0, -1).Value = Date
'Target.Offset(0, 1).Value = BUL.Offset(0, 6).Value
End If
End If
For Sat = 2 To 65
If Cells(Sat, 9) = "" Then
'Rows(sat).Delete
Rows(Sat).ClearContents
End If
Next
Son:
End Sub
Bu kod eile, satış fişinen J sütununda yazılı bulunan barkodları database sayfasından model ve renk numaralarını getirmektedir.
Bu iki kod ayrı ayrı çalışmasında herhangi bir sıkıntı yok.
Benim istediğim her iki kodu birleştirerek Satış irsaliyesinde de C sütununda herhangi bir model numarısında F2 enter yaptığımda yine STOK Sayfasında ilk eşleşen Model numaraya gitmesi.
Her iki kodun birleştirmesini ne yaptımsa iki kodu bir arada çalıştıramadım, uzman arkadaşlardan yardım talep ediyorum.
Örnek dosyam etkedir.
