Sub DENGELI_DAGITIM_FINAL()
Set t = ThisWorkbook.Sheets("ANA DATA"): Set c = ThisWorkbook.Sheets("Çalışan Listesi")
Application.ScreenUpdating = False: Application.Calculation = xlCalculationManual
If t.AutoFilterMode Then t.AutoFilterMode = False
If c.AutoFilterMode Then c.AutoFilterMode = False
ason = t.Cells(Rows.Count, 1).End(3).Row: cs = c.Cells(Rows.Count, 2).End(3).Row
t.[BA:BB].Insert: c.[BA:BA].Insert
TEMIZLE
On Error GoTo 10
c.Range("BA2:BA" & cs).Formula = "=IF(D2<>"""",D2,IF(SUMPRODUCT(($C$2:$C$" & cs & "=C2)*($D$2:$D$" & cs & _
"=""Uzay""))=0,""Uzay"",IF(SUMPRODUCT(($C$2:$C$" & cs & "=C2)*($D$2:$D$" & cs & "=""Robot""))=0,""Robot"","""")))"
c.Range("BA2:BA" & cs).Calculate: c.Range("BA2:BA" & cs).Value = c.Range("BA2:BA" & cs).Value
For s = 2 To ason
If t.Cells(s, 8) <> "" Then
t.Cells(s, 34) = t.Cells(s, 8)
t.Cells(s, 53) = t.Cells(s, 32) & "|" & t.Cells(s, 33) & "|" & t.Cells(s, 8)
End If
Next
For s = 2 To ason
If t.Cells(s, 34) = "" Then
x = Evaluate("=SUMPRODUCT(--('Çalışan Listesi'!C2:C" & cs & "&""|""&'Çalışan Listesi'!BA2:BA" & _
cs & "='ANA DATA'!AF" & s & "&""|""&'ANA DATA'!AG" & s & "))")
If x > 0 Then
say = say + 1: t.[BB:BB].ClearContents: t.[BB1] = t.Cells(s, 32) & "|" & t.Cells(s, 33)
For sss = 2 To ason
If t.Cells(sss, 34) <> "" Then _
t.Cells(sss, 53) = t.Cells(sss, 32) & "|" & t.Cells(sss, 33) & "|" & t.Cells(sss, 34)
Next
For ss = 2 To cs
If c.Cells(ss, 3) & "|" & c.Cells(ss, 53) = t.[BB1] Then
ara = c.Cells(ss, 3) & "|" & c.Cells(ss, 53) & "|" & c.Cells(ss, 2)
adet = WorksheetFunction.CountIf(t.[BA:BA], ara)
Randomize: XD = Rnd(): If XD = 0 Then XD = 3 / 10
t.Cells(ss, 54) = adet + XD / 100
End If
Next:
t.Cells(s, 34) = c.Cells(WorksheetFunction.Match(WorksheetFunction.Small(t.[BB:BB], 1), t.[BB:BB], 0), 2)
End If: End If:: Next
10: t.[BA:BB].Delete: c.[BA:BA].Delete
Application.ScreenUpdating = True: Application.Calculation = xlCalculationAutomatic
If say > 0 Then MsgBox "İşlem tamamlandı..", vbInformation, "::.. Ömer BARAN ..::"
If say = 0 Then MsgBox "İşlem YAPILAMADI..", vbCritical, "::.. Ömer BARAN ..::"
End Sub
Sub TEMIZLE()
Application.ScreenUpdating = True: Application.Calculation = xlCalculationAutomatic
Sheets("ANA DATA").Range("AH2:AH" & Rows.Count).ClearContents
If Sheets("ANA DATA").[BB1] <> "" Then Sheets("ANA DATA").[BA:BB].Delete
If Sheets("Çalışan Listesi").[BA2].Value <> "" Then Sheets("Çalışan Listesi").[BA:BA].Delete
End Sub