- Katılım
- 8 Haziran 2007
- Mesajlar
- 761
- Excel Vers. ve Dili
- excel- 2003 Türkçe
Bu kod ile Personelin Adını aktarıyorum personelin adı D sütununda, E sutununda bulunan soyadını da bir hücreye gelecek şekilde aktarmak istuyorum. shA.Cells(Y, 1) = shD.Cells(Hucre.Row, 4)
Sub Maaş_Disket()
Dim Hucre As Range
Set shD = Sheets("Data")
Set shA = Sheets("Maaş_Disket")
Y = 11
For Each Hucre In shD.Range("d11:d305")
If IsError(Hucre) = True Then: GoTo f1
If Hucre.Value = 0 Or Hucre.Value = "" Then: GoTo f1
shA.Cells(Y, 1) = shD.Cells(Hucre.Row, 4)
shA.Cells(Y, 2) = shD.Cells(Hucre.Row, 47)
shA.Cells(Y, 3) = shD.Cells(Hucre.Row, 2)
shA.Cells(Y, 4) = shD.Cells(Hucre.Row, 57)
shA.Cells(Y, 7) = shD.Cells(Hucre.Row, Hucre.Column)
Y = Y + 1
f1:
Next
Set shD = Nothing
Set shA = Nothing
End Sub
Sub Maaş_Disket()
Dim Hucre As Range
Set shD = Sheets("Data")
Set shA = Sheets("Maaş_Disket")
Y = 11
For Each Hucre In shD.Range("d11:d305")
If IsError(Hucre) = True Then: GoTo f1
If Hucre.Value = 0 Or Hucre.Value = "" Then: GoTo f1
shA.Cells(Y, 1) = shD.Cells(Hucre.Row, 4)
shA.Cells(Y, 2) = shD.Cells(Hucre.Row, 47)
shA.Cells(Y, 3) = shD.Cells(Hucre.Row, 2)
shA.Cells(Y, 4) = shD.Cells(Hucre.Row, 57)
shA.Cells(Y, 7) = shD.Cells(Hucre.Row, Hucre.Column)
Y = Y + 1
f1:
Next
Set shD = Nothing
Set shA = Nothing
End Sub