sayfa 1 deki tabloya
DATA sayfasındanki personelin (sicil) tarih ve giris saatine göre
sayfa 1 deki tabloda görebiliyorum ancak data yı sap programından guncelleyince farklı siciller eklenince kod calışmıyor kodu güncelleye bilirizmi
Option Explicit
Private Sub btnAktar_Click()
Range("d3:aı1000").ClearContents
Dim Say As Integer
Dim SayTarih As Integer
Dim Tarih As Variant
Dim Sicil As Variant
Dim Bak As Range
Dim BulSatir As Integer
Dim BulSutun As Range
With Worksheets("data")
Say = .Cells(Rows.Count, "C").End(xlUp).Row
SayTarih = Cells(1, Columns.Count).End(xlToLeft).Column
For Each Bak In .Range("A2:A" & Say)
Sicil = Bak.Text
Tarih = .Cells(Bak.Row, "I")
BulSatir = Range("C:C").Find(Sicil).Row
For Each BulSutun In Range("I1:" & Cells(1, SayTarih).Address)
If Tarih = BulSutun And .Cells(Bak.Row, "F").Text = "Giriş" Then
Cells(BulSatir, BulSutun.Column) = .Cells(Bak.Row, "H").Text
Exit For
End If
Next
Next
End With
MsgBox "Aktarma tamamlandı.", vbInformation
End Sub
DATA sayfasındanki personelin (sicil) tarih ve giris saatine göre
sayfa 1 deki tabloda görebiliyorum ancak data yı sap programından guncelleyince farklı siciller eklenince kod calışmıyor kodu güncelleye bilirizmi
Option Explicit
Private Sub btnAktar_Click()
Range("d3:aı1000").ClearContents
Dim Say As Integer
Dim SayTarih As Integer
Dim Tarih As Variant
Dim Sicil As Variant
Dim Bak As Range
Dim BulSatir As Integer
Dim BulSutun As Range
With Worksheets("data")
Say = .Cells(Rows.Count, "C").End(xlUp).Row
SayTarih = Cells(1, Columns.Count).End(xlToLeft).Column
For Each Bak In .Range("A2:A" & Say)
Sicil = Bak.Text
Tarih = .Cells(Bak.Row, "I")
BulSatir = Range("C:C").Find(Sicil).Row
For Each BulSutun In Range("I1:" & Cells(1, SayTarih).Address)
If Tarih = BulSutun And .Cells(Bak.Row, "F").Text = "Giriş" Then
Cells(BulSatir, BulSutun.Column) = .Cells(Bak.Row, "H").Text
Exit For
End If
Next
Next
End With
MsgBox "Aktarma tamamlandı.", vbInformation
End Sub
