kemal turan
Altın Üye
- Katılım
- 10 Haziran 2011
- Mesajlar
- 1,677
- Excel Vers. ve Dili
- Excel 2010 32 bit
Aşağıdaki kodda kopyalanan hücrelerin biçimleri tarih,sayı,metin iken kasa sahifesine yapıştırıldığında tamamı METİN oluyor.6/1/2012 olan tarih 1/6/2011 oluyor.
Kopyalandiği gibi yapıştıracak kod eklemesi yapabilirmiyiz.
Teşekürler
Sub deneme()
Set s1 = Sheets("CARİ")
Set s2 = Sheets("KASA")
Range("a1").AutoFilter
Range("a1").AutoFilter field:=9, Criteria1:=">=" & CLng(Range("p1").Value), _
Operator:=xlAnd, field:=9, Criteria2:="<=" & CLng(Range("q1").Value)
m = MsgBox("KAYIT YAPILSIN MI.", vbYesNo, "istikbal")
If m <> vbYes Then Exit Sub
For i = 2 To s1.Range("A65536").End(3).Row
SONSTR = s2.Range("c65536").End(3).Row + 1
If s1.Cells(i, 1).EntireRow.Hidden = False Then
s2.Cells(SONSTR, 7).Value = s1.Cells(i, 2).Value
s2.Cells(SONSTR, 5).Value = s1.Cells(i, 4).Value
s2.Cells(SONSTR, 8).Value = s1.Cells(i, 7).Value
s2.Cells(SONSTR, 3).Value = s1.Cells(i, 9).Value
s2.Cells(SONSTR, 4).Value = s1.Cells(i, 11).Value
s2.Cells(SONSTR, 6).Value = s1.Cells(i, 12).Value
End If
Next
Sheets("kasa").Select
MsgBox "Kayıt işlemi tamamlanmıştır.", , "istikbal"
End Sub
Kopyalandiği gibi yapıştıracak kod eklemesi yapabilirmiyiz.
Teşekürler
Sub deneme()
Set s1 = Sheets("CARİ")
Set s2 = Sheets("KASA")
Range("a1").AutoFilter
Range("a1").AutoFilter field:=9, Criteria1:=">=" & CLng(Range("p1").Value), _
Operator:=xlAnd, field:=9, Criteria2:="<=" & CLng(Range("q1").Value)
m = MsgBox("KAYIT YAPILSIN MI.", vbYesNo, "istikbal")
If m <> vbYes Then Exit Sub
For i = 2 To s1.Range("A65536").End(3).Row
SONSTR = s2.Range("c65536").End(3).Row + 1
If s1.Cells(i, 1).EntireRow.Hidden = False Then
s2.Cells(SONSTR, 7).Value = s1.Cells(i, 2).Value
s2.Cells(SONSTR, 5).Value = s1.Cells(i, 4).Value
s2.Cells(SONSTR, 8).Value = s1.Cells(i, 7).Value
s2.Cells(SONSTR, 3).Value = s1.Cells(i, 9).Value
s2.Cells(SONSTR, 4).Value = s1.Cells(i, 11).Value
s2.Cells(SONSTR, 6).Value = s1.Cells(i, 12).Value
End If
Next
Sheets("kasa").Select
MsgBox "Kayıt işlemi tamamlanmıştır.", , "istikbal"
End Sub
Son düzenleme:
