22/04/2020, 01:54
feraz
If .Cells(i, "H").Value + .Cells(i, "I").Value < 700 Then
.Cells(i, "J").Value = 1
ElseIf .Cells(i, "H").Value + .Cells(i, "I").Value >= 700 Then
.Cells(i, "K").Value = 1
End If
Rica ederim herzaman istekte bulunabilirsiniz.Bir deneyiniz yukardaki koddaki 700 olan yeri belki ayarlamanız gerekebilir.Normalde diğer kod hızlı olmalıydı sanki
Sub ilkVeSonKlasor()
Dim son As Long
With Sheets("ANA SAYFA")
son = .Cells(Rows.Count, 1).End(3).Row
If WorksheetFunction.CountA(.Range("A2:A" & Rows.Count)) > 2 Then
Me.TextBox1.Value = .Cells(4, "A").Value
Me.TextBox2.Value = .Cells(son - 1, "A").Value
End If
End With
End Sub
Sub CdDvd()
Dim i As Long, son As Long
Application.ScreenUpdating = False
With Sheets("ANA SAYFA")
son = .Cells(Rows.Count, 1).End(3).Row
.Range("J4:K" & Rows.Count).ClearContents
If son < 4 Then Exit Sub
For i = 4 To son
If WorksheetFunction.CountA(.Range("H" & i & ":I" & i)) > 0 Then
If .Cells(i, "H").Value + .Cells(i, "I").Value < 700 Then
.Cells(i, "J").Value = 1
ElseIf .Cells(i, "H").Value + .Cells(i, "I").Value >= 700 Then
.Cells(i, "K").Value = 1
End If
End If
Next
With .Range("J3:K3")
If son > 4 Then
.Formula = "=sum(J4:J" & son - 1 & ")"
Else
.Formula = 0
End If
.Value = .Value
End With
End With
Application.ScreenUpdating = True
End Sub