- Katılım
- 8 Haziran 2007
- Mesajlar
- 761
- Excel Vers. ve Dili
- excel- 2003 Türkçe
Aşağıdaki kod ile Bordro sayfasından veri alıyorum. Buna birde "Personel_Bilgi" sayfasıın A ve C sutunlarından veri almak istiyorum. ilgilenen arkadaşlara teşekkürler.
Sub ÖzelKesinti()
Dim Hucre As Range
Set shD = Sheets("bordro")
Set shA = Sheets("ÖzelKesinti")
Y = 7
For Each Hucre In shD.Range("ax11:ax325")
If IsError(Hucre) = True Then: GoTo f1
If Hucre.Value = 0 Or Hucre.Value = "" Then: GoTo f1
shA.Cells(Y, 3) = shD.Cells(Hucre.Row, 4)
shA.Cells(Y, 4) = shD.Cells(Hucre.Row, 5)
shA.Cells(Y, 5) = shD.Cells(Hucre.Row, 60)
shA.Cells(Y, 6) = shD.Cells(Hucre.Row, 61)
shA.Cells(Y, 7) = shD.Cells(Hucre.Row, 71)
shA.Cells(Y, 10) = shD.Cells(Hucre.Row, Hucre.Column)
Y = Y + 1
f1:
Next
Set shD = Nothing
Set shA = Nothing
End Sub
Sub ÖzelKesinti()
Dim Hucre As Range
Set shD = Sheets("bordro")
Set shA = Sheets("ÖzelKesinti")
Y = 7
For Each Hucre In shD.Range("ax11:ax325")
If IsError(Hucre) = True Then: GoTo f1
If Hucre.Value = 0 Or Hucre.Value = "" Then: GoTo f1
shA.Cells(Y, 3) = shD.Cells(Hucre.Row, 4)
shA.Cells(Y, 4) = shD.Cells(Hucre.Row, 5)
shA.Cells(Y, 5) = shD.Cells(Hucre.Row, 60)
shA.Cells(Y, 6) = shD.Cells(Hucre.Row, 61)
shA.Cells(Y, 7) = shD.Cells(Hucre.Row, 71)
shA.Cells(Y, 10) = shD.Cells(Hucre.Row, Hucre.Column)
Y = Y + 1
f1:
Next
Set shD = Nothing
Set shA = Nothing
End Sub