- Katılım
- 15 Mart 2005
- Mesajlar
- 42,250
- Excel Vers. ve Dili
- Microsoft 365 Tr-En 64 Bit
Deneyiniz.
C++:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Sh As Worksheet
If Intersect(Target, Range("D7:D30")) Is Nothing Then Exit Sub
If Target.Cells.Count > 1 Then Exit Sub
If Target <> "" Then
Set Sh = Sheets("Arşiv")
If WorksheetFunction.CountIfs(Sh.Range("A:A"), Cells(Target.Row, "A"), _
Sh.Range("B:B"), Cells(Target.Row, "B"), _
Sh.Range("C:C"), Cells(Target.Row, "C"), _
Sh.Range("D:D"), Cells(Target.Row, "D"), _
Sh.Range("E:E"), Cells(Target.Row, "E"), _
Sh.Range("F:F"), Cells(Target.Row, "F"), _
Sh.Range("G:G"), Cells(Target.Row, "G"), _
Sh.Range("H:H"), Cells(Target.Row, "H"), _
Sh.Range("I:I"), Cells(Target.Row, "I"), _
Sh.Range("J:J"), Cells(Target.Row, "J"), _
Sh.Range("K:K"), Cells(Target.Row, "K"), _
Sh.Range("L:L"), Cells(Target.Row, "L"), _
Sh.Range("M:M"), Cells(Target.Row, "M"), _
Sh.Range("N:N"), Cells(Target.Row, "N"), _
Sh.Range("O:O"), Cells(Target.Row, "O")) = 0 Then
Application.ScreenUpdating = False
Range("A" & Target.Row & ":Q" & Target.Row).Copy
Sh.Cells(1048576, "A").End(3)(2, 1).PasteSpecial xlPasteValues
Sh.Cells(1048576, "A").End(3)(1, 1).PasteSpecial xlPasteFormats
Sh.Cells(1048576, "P").End(3)(2, 1) = Now
With Sh.Range("O2:O" & Sh.Cells(1048576, "A").End(3).Row)
.Formula = "=IF(A1<>A2,"""",(0.0416666666642413*(L2-L1))/(D2-D1))"
.Value = .Value
End With
Application.CutCopyMode = False
Application.ScreenUpdating = True
Else
MsgBox "Bu kayıt daha önce arşiv sayfasına aktarılmıştır.", vbCritical
End If
Set Sh = Nothing
End If
End Sub