İ
İhsan Tank
Misafir
selam arkadaşlar benim elimde aşağıdaki gibi bir makro var ve hücre satırına ikinci defa tarih attığımda aynı bilgileri tekrardan atıyor ben sadece aynı bilgileri bir defa atmasını istiyorum yardımlarınızı bekliyorum.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim HÜCRE As Range
Set s2 = Sheets("M1")
If Intersect(Target, [B1]) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
If IsDate(Target) Then
For Each HÜCRE In Range("B3:B" & Range("B65536").End(3).Row)
If Format(HÜCRE.Value, "m") = Format(Target, "m") And Year(HÜCRE.Value) = Year(Target) Then
Sat = s2.[b79].End(3).Row + 1
If Sat = 5 Then Sat = Sat + 1
s2.Cells(Sat, "b") = HÜCRE
s2.Cells(Sat, "e") = Cells(HÜCRE.Row, "c")
s2.Cells(Sat, "d") = Cells(HÜCRE.Row, "d")
s2.Cells(Sat, "f") = Cells(HÜCRE.Row, "f")
s2.Cells(Sat, "c") = Cells(HÜCRE.Row, "e")
s2.Cells(Sat, "g") = Cells(HÜCRE.Row, "g")
s2.Cells(Sat, "I") = Cells(HÜCRE.Row, "h")
End If
Next
MsgBox "İşlem tamam.", vbInformation
End If
Application.ScreenUpdating = True
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim HÜCRE As Range
Set s2 = Sheets("M1")
If Intersect(Target, [B1]) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
If IsDate(Target) Then
For Each HÜCRE In Range("B3:B" & Range("B65536").End(3).Row)
If Format(HÜCRE.Value, "m") = Format(Target, "m") And Year(HÜCRE.Value) = Year(Target) Then
Sat = s2.[b79].End(3).Row + 1
If Sat = 5 Then Sat = Sat + 1
s2.Cells(Sat, "b") = HÜCRE
s2.Cells(Sat, "e") = Cells(HÜCRE.Row, "c")
s2.Cells(Sat, "d") = Cells(HÜCRE.Row, "d")
s2.Cells(Sat, "f") = Cells(HÜCRE.Row, "f")
s2.Cells(Sat, "c") = Cells(HÜCRE.Row, "e")
s2.Cells(Sat, "g") = Cells(HÜCRE.Row, "g")
s2.Cells(Sat, "I") = Cells(HÜCRE.Row, "h")
End If
Next
MsgBox "İşlem tamam.", vbInformation
End If
Application.ScreenUpdating = True
End Sub
