- Katılım
- 19 Aralık 2011
- Mesajlar
- 101
- Excel Vers. ve Dili
- 2003
tr
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub Worksheet_Change(ByVal Target As Range)
Dim S1, S2, BUL, Satir
If Intersect(Target, Range("B3:B" & Rows.Count)) Is Nothing Then Exit Sub
If Target.Cells.Count > 1 Then Exit Sub
If Target <> "" Then
Set S1 = Sheets("SİPARİŞ")
Set S2 = Sheets("liste")
Set BUL = S2.Range("A:A").Find(Target, , , xlWhole)
If Not BUL Is Nothing Then
Target.Next = BUL.Offset(0, 1)
Else
If MsgBox(Target & " isimli ürün bulunamadı!" & Chr(10) & _
"Liste sayfasına eklemek ister misiniz?", vbCritical + vbOKCancel) = vbCancel Then Exit Sub
Satir = S2.Cells(Rows.Count, 1).End(3).Row + 1
S2.Cells(Satir, 1) = Target
S2.Cells(Satir, 2) = Target.Next
End If
End If
End Sub
Else
If MsgBox(Target & " isimli ürün bulunamadı!" & Chr(10) & _
"Liste sayfasına eklemek ister misiniz?", vbCritical + vbOKCancel) = vbCancel Then Exit Sub
Satir = S2.Cells(Rows.Count, 1).End(3).Row + 1
S2.Cells(Satir, 1) = Target
S2.Cells(Satir, 2) = Target.Next
Target.Next = BUL.Offset(0, 1)
Cells(Target.Row, "C") = BUL.Offset(0, 1)
Cells(Target.Row, "D") = BUL.Offset(0, 2)
Cells(Target.Row, "E") = BUL.Offset(0, 3)
Private Sub Worksheet_Change(ByVal Target As Range)
Dim S1, S2, BUL, Satir
If Intersect(Target, Range("B3:B" & Rows.Count)) Is Nothing Then Exit Sub
If Target.Cells.Count > 1 Then Exit Sub
If Target <> "" Then
Set S1 = Sheets("SİPARİŞ FORMU")
Set S2 = Sheets("ÜRÜN GRUBU")
Set BUL = S2.Range("A:A").Find(Target, , , xlWhole)
If Not BUL Is Nothing Then
Cells(Target.Row, "C") = BUL.Offset(0, 1)
Cells(Target.Row, "D") = BUL.Offset(0, 2)
Cells(Target.Row, "E") = BUL.Offset(0, 3)
End If
Else
Range("C" & Target.Row & ":E" & Target.Row).ClearContents
End If
End Sub