Ich habe 2 Spalten mit jeweils Verschiedenen Ueberschriften. Es kann vorkommen das Pro ueberschrift garkein unterpunkt oder gar mehrere unterpunkte auftauchen oder die ueberschrift taucht garnert auf.
Es ist zu gucken, ob in Spalte2 die ueberschrift aus spalte1 auftaucht, wenn ja, dann untersuche die unterpunkte auf unterschiede. Wenn nein, faerbe das feld ein. Ich bin mir bei der programmierung in VBA auch nicht sicher... hoffe man versteht vorauf ich hinaus will. Es ist denke ich auch mal sehr umstaendlich geschrieben, aber ich wusste nix anderes.
Wusste nur nicht, wie ich gruppenweise die spalten vergleiche (pro spalte mehr als 10 gruppen). sonst waere es ja einfach die kompletten spalten zu vergleichen.
Do While Cells(CounterA, "A").Value "" 'looking for Groups
If Cells(CounterA, "A").Value = "Test Case For*" Then
Groupname = Cells(CounterA, "A").Value 'define first Group
CounterA = CounterA + 1
If Cells(CounterA, "A").Value "Test Case For*" Then 'looking for Tests
Start = Cells(CounterA, "A")
Do While Cells(CounterA, "A").Value "Test Case For*"
Ende = Cells(CounterA, "A")
CounterA = CounterA + 1
Loop
Else
CounterA = CounterA - 1
Start = Cells(CounterA, "A")
Ende = Cells(CounterA, "A")
End If
Do While Cells(CounterB, "G").Value ""
If Cells(CounterB, "G") = Groupname Then
CounterB = CounterB + 1
If Cells(CounterB, "G").Value = "Test Case For*" Then
Range(StartA, EndeA).Select 'making range of sheet1 colored
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Else
StartB = Cells(CounterB, "G")
Do While Cells(CounterB, "G").Value "Test Case For*"
EndeB = Cells(CounterB, "G")
CounterB = CounterB + 1
Loop
End If
Range("StartA:EndeA").Select
Application.CutCopyMode = False
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=COUNTIF(StartB:EndeB;StartA)=0"
Selection.FormatConditions(1).Interior.ColorIndex = 4
Else
CounterB = CounterB + 1
End If
Loop
CounterA = CounterA + 1
Else
CounterA = CounterA + 1
End If
Loop
hier ist mein Hauptteil...
Hoffe auf bemerkungen und Urteile...
Danke
weiss leider hier auch nicht, wie ich die formatierung hinbekomme... sorry dafuer. Bin ein wenig durcheinander