- Katılım
- 28 Ekim 2010
- Mesajlar
- 26
- Excel Vers. ve Dili
- excell versiyonum 2010 ve türkçe destekli
kolay gelsin. ben isim soysimayırmakta şu şekilde bir kod kullanıyorum. fakat sütundaki bütün verileri her tıklamamda tekrar ayırıyor. bu durumda otomatik tarih atmayı olumsuz etkiliyor. bütün tarihler otomatik olarak bugün oluyor. benim istediğim benim o anki veri girişi yaptığım satırı ayırsın sadece. diğerleri zaten ayrılmış olacak. bu konu hakkında yardımcı olurmusunuz ?
Private Sub CommandButton3_Click()
Dim i As Long
i = Sheets("Satışlar").Range("L1048576").End(3).Row + 1
If TextBox1.Text = Empty Then
MsgBox "Lütfen Barkod Giriniz"
ComboBox1.SetFocus
Exit Sub
End If
Sheets("Satışlar").Cells(i, 12) = ComboBox1.Text
Sheets("Satışlar").Cells(i, 5) = TextBox1.Text
Sheets("Satışlar").Cells(i, 9) = TextBox2.Text
MsgBox "Satış İşlemi Tamamlanmıştır"
For b = 2 To Cells(1048576, 12).End(xlUp).Row
a = Split(Cells(b, 12), " ")
deg = "": deg2 = ""
If UBound(a) = 0 Then
Cells(b, "D").Value = Cells(b, "C").Value
ElseIf UBound(a) = 1 Then
Cells(b, "C").Value = a(0)
Cells(b, "D").Value = a(1)
Else
For k = 0 To UBound(a)
If k <= 1 Then
deg = deg & " " & a(k)
Cells(b, "C").Value = Right(deg, Len(deg) - 1)
Else
deg2 = deg2 & " " & a(k)
Cells(b, "D").Value = Right(deg2, Len(deg2) - 1)
End If
Next k
End If
Next
UserForm5.Hide
UserForm6.Show
End Sub
Private Sub CommandButton3_Click()
Dim i As Long
i = Sheets("Satışlar").Range("L1048576").End(3).Row + 1
If TextBox1.Text = Empty Then
MsgBox "Lütfen Barkod Giriniz"
ComboBox1.SetFocus
Exit Sub
End If
Sheets("Satışlar").Cells(i, 12) = ComboBox1.Text
Sheets("Satışlar").Cells(i, 5) = TextBox1.Text
Sheets("Satışlar").Cells(i, 9) = TextBox2.Text
MsgBox "Satış İşlemi Tamamlanmıştır"
For b = 2 To Cells(1048576, 12).End(xlUp).Row
a = Split(Cells(b, 12), " ")
deg = "": deg2 = ""
If UBound(a) = 0 Then
Cells(b, "D").Value = Cells(b, "C").Value
ElseIf UBound(a) = 1 Then
Cells(b, "C").Value = a(0)
Cells(b, "D").Value = a(1)
Else
For k = 0 To UBound(a)
If k <= 1 Then
deg = deg & " " & a(k)
Cells(b, "C").Value = Right(deg, Len(deg) - 1)
Else
deg2 = deg2 & " " & a(k)
Cells(b, "D").Value = Right(deg2, Len(deg2) - 1)
End If
Next k
End If
Next
UserForm5.Hide
UserForm6.Show
End Sub
