DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub Test()
c = 1
For Each hcr In Sheets("Sheet1").[c3:q9]
If hcr.Interior.Color = vbYellow Then
If Sheets("Sheet1").Cells(hcr.Row, hcr.Column + 1).Interior.Color = vbYellow Then
c = c + 1
Sheets("Sheet2").Cells(c, 1) = Sheets("Sheet1").Cells(hcr.Row, 2)
Sheets("Sheet2").Cells(c, 2) = Sheets("Sheet1").Cells(2, hcr.Column)
End If
End If
Next
End Sub
Sub Test2()
c = 1
With Sheets("Sheet1")
For Each hcr In .[c3:v9]
If hcr.Interior.ColorIndex = 38 Then
If hcr.Offset(0, 1).Interior.ColorIndex <> 38 Then
For Each hcr2 In .Range(hcr.Address & ":" & "v" & hcr.Row)
If hcr2.Interior.ColorIndex = 6 Then
c = c + 1
Sheets("Sheet2").Cells(c, 2) = .Cells(2, hcr.Column)
Sheets("Sheet2").Cells(c, 1) = .Cells(hcr2.Row, 2)
Sheets("Sheet2").Cells(c, 3) = .Cells(2, hcr2.Column)
GoTo 10
End If
Next
End If
End If
10:
Next
End With
End Sub
Sub Test3()
c = 1
With Sheet1
For Each hcr3 In .[c3:v9]
d = d + 1
If d = 14 Then d = 0: pembe = False: sari = False: GoTo 20
If hcr3.Interior.ColorIndex = 6 Then sari = True
If hcr3.Interior.ColorIndex = 38 Then pembe = True
If d = 13 Then
If sari = True And pembe = False Then
MsgBox hcr3.Row & ". satırda sadece sarı var"
c = c + 1
For Each hcr4 In .Range(.Cells(hcr3.Row, 3), .Cells(hcr3.Row, 13))
If hcr4.Interior.Color = vbYellow Then
If .Cells(hcr4.Row, hcr4.Column + 1).Interior.Color = vbYellow Then
Sheets("Sayfa2").Cells(c, 1) = .Cells(hcr4.Row, 2)
Sheets("Sayfa2").Cells(c, 2) = .Cells(2, hcr4.Column)
End If
End If
Next
ElseIf sari = True And pembe = True Then
If hcr3.Offset(0, 1).Interior.ColorIndex <> 38 Then
MsgBox hcr3.Row & ". satırda hem pembe hem sarı var"
c = c + 1
For Each hcr In .Range(Cells(hcr3.Row, 3), Cells(hcr3.Row, 13)).Cells
If hcr.Interior.ColorIndex = 38 Then
If hcr.Offset(0, 1).Interior.ColorIndex <> 38 Then
For Each hcr2 In .Range(hcr.Address & ":" & "v" & hcr.Row)
If hcr2.Interior.ColorIndex = 6 Then
Sayfa1.Cells(c, 2) = .Cells(2, hcr.Column)
Sayfa1.Cells(c, 1) = .Cells(hcr2.Row, 2)
Sayfa1.Cells(c, 3) = .Cells(2, hcr2.Column)
End If
Next
End If
End If
Next
GoTo 20
End If
End If
End If
20:
Next
End With
MsgBox "İşlem Bitti"
End Sub