DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Intersect(Target, [E2:E65000]) Is Nothing Then Exit Sub
Set alan = Range("A" & Target.Row & ":E" & Target.Row)
If Target = "" Then
alan.Interior.ColorIndex = xlNone
Else
alan.Interior.ColorIndex = 15
Range("B" & Target.Row).ClearContents
End If
End Sub
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Alan1 As Range, Alan2 As Range
On Error GoTo Son
If Intersect(Target, [E2:E65536,K2:K65536]) Is Nothing Then Exit Sub
If Target.Column = 5 Then
Set Alan1 = Range("A" & Target.Row & ":E" & Target.Row)
If Target = "" Then
Alan1.Interior.ColorIndex = xlNone
Else
Alan1.Interior.ColorIndex = 15
Range("B" & Target.Row).ClearContents
End If
ElseIf Target.Column = 11 Then
Set Alan2 = Range("G" & Target.Row & ":K" & Target.Row)
If Target = "" Then
Alan2.Interior.ColorIndex = xlNone
Else
Alan2.Interior.ColorIndex = 15
Range("H" & Target.Row).ClearContents
End If
End If
Son:
End Sub
Option Explicit
Sub SİPARİŞLERİ_KONTROL_ET()
Dim S1 As Worksheet, S2 As Worksheet
Dim Sayfalar(), X As Byte, Y As Long, Satır As Long
Set S1 = Sheets("sipariş liste")
Set S2 = Sheets("arşiv")
Sayfalar = Array("makine 1", "makine 2")
Satır = 2
Application.ScreenUpdating = False
S2.Range("A2:E65536").Clear
For X = 0 To UBound(Sayfalar())
For Y = 2 To Sheets(Sayfalar(X)).Range("A65536").End(3).Row
If Sheets(Sayfalar(X)).Cells(Y, "A").Interior.ColorIndex <> xlNone Then
If WorksheetFunction.CountIf(S1.Range("A:A"), Sheets(Sayfalar(X)).Cells(Y, "A")) = 0 Then
Sheets(Sayfalar(X)).Range("A" & Y & ":E" & Y).Cut S2.Range("A" & Satır)
Satır = Satır + 1
End If
End If
Next
For Y = 2 To Sheets(Sayfalar(X)).Range("G65536").End(3).Row
If Sheets(Sayfalar(X)).Cells(Y, "G").Interior.ColorIndex <> xlNone Then
If WorksheetFunction.CountIf(S1.Range("A:A"), Sheets(Sayfalar(X)).Cells(Y, "G")) = 0 Then
Sheets(Sayfalar(X)).Range("G" & Y & ":K" & Y).Cut S2.Range("A" & Satır)
Satır = Satır + 1
End If
End If
Next
Next
Set S1 = Nothing
Set S2 = Nothing
Application.ScreenUpdating = True
MsgBox "İşleminiz tamamlanmıştır.", vbInformation
End Sub
Option Explicit
Sub SİPARİŞLERİ_KONTROL_ET()
Dim S1 As Worksheet, S2 As Worksheet
Dim Sayfalar(), X As Byte, Y As Long, Satır As Long
Set S1 = Sheets("sipariş liste")
Set S2 = Sheets("arşiv")
Sayfalar = Array("makine 1", "makine 2")
Satır = S2.Range("A65536").End(3).Row + 1
Application.ScreenUpdating = False
For X = 0 To UBound(Sayfalar())
For Y = Sheets(Sayfalar(X)).Range("A65536").End(3).Row To 2 Step -1
If Sheets(Sayfalar(X)).Cells(Y, "A").Interior.ColorIndex <> xlNone Then
If WorksheetFunction.CountIf(S1.Range("A:A"), Sheets(Sayfalar(X)).Cells(Y, "A")) = 0 Then
Sheets(Sayfalar(X)).Range("A" & Y & ":E" & Y).Cut S2.Range("A" & Satır)
Sheets(Sayfalar(X)).Range("A" & Y & ":E" & Y).Delete
Satır = Satır + 1
End If
End If
Next
For Y = Sheets(Sayfalar(X)).Range("G65536").End(3).Row To 2 Step -1
If Sheets(Sayfalar(X)).Cells(Y, "G").Interior.ColorIndex <> xlNone Then
If WorksheetFunction.CountIf(S1.Range("A:A"), Sheets(Sayfalar(X)).Cells(Y, "G")) = 0 Then
Sheets(Sayfalar(X)).Range("G" & Y & ":K" & Y).Cut S2.Range("A" & Satır)
Sheets(Sayfalar(X)).Range("G" & Y & ":K" & Y).Delete
Satır = Satır + 1
End If
End If
Next
Next
Set S1 = Nothing
Set S2 = Nothing
Application.ScreenUpdating = True
MsgBox "İşleminiz tamamlanmıştır.", vbInformation
End Sub