Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Dim suche As Range
If Target.Column = 2 And Target.Row > 49 And Target.Row < 61 Then
Set suche = Workbooks(1).Worksheets(1).Range("B2:B30").Find(Cells(Target.Row, Target.Column))
If Not suche Is Nothing Then
Workbooks(1).Worksheets(1).Cells(suche.Row, 2).Interior.ColorIndex = 3
End If
End If
Application.EnableEvents = True
End SubGlobal findex As VariantPrivate Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Dim suche As Range
Dim suche1 As Range
If Target.Column = 3 And Target.Row > 19 And Target.Row < 41 Then
Set suche = Workbooks(1).Worksheets(1).Range("B2:B30").Find(Cells(Target.Row, Target.Column))
If Not suche Is Nothing Then
Workbooks(1).Worksheets(1).Cells(suche.Row, 2).Interior.ColorIndex = 3
End If
End If
If findex <> Workbooks(1).Worksheets(1).Cells(Target.Row, 3) And findex <> "" Then
Set suche1 = Workbooks(1).Worksheets(1).Range("B2:B30").Find(findex)
If Not suche1 Is Nothing Then
Workbooks(1).Worksheets(1).Cells(suche1.Row, 2).Interior.ColorIndex = xlNone
End If
End If
findex = ""
Application.EnableEvents = True
End SubPrivate Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
If Target.Column = 3 And Target.Row > 19 And Target.Row < 41 Then
findex = Workbooks(1).Worksheets(1).Cells(Target.Row, 3)
End If
Application.EnableEvents = True
End SubGlobal findex As Variant
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Dim suche As Range
Dim suche1 As Range
If Target.Column = 3 And Target.Row > 19 And Target.Row < 41 Then
Set suche = Workbooks(1).Worksheets(1).Range("B2:B30").Find(Cells(Target.Row, Target.Column))
If Not suche Is Nothing Then
Workbooks(1).Worksheets(1).Cells(suche.Row, 2).Interior.ColorIndex = 3
Else
If findex <> "" Then
Set suche1 = Workbooks(1).Worksheets(1).Range("B2:B30").Find(findex)
If Not suche1 Is Nothing Then
Workbooks(1).Worksheets(1).Cells(suche1.Row, 2).Interior.ColorIndex = xlNone
End If
End If
End If
End If
findex = ""
Application.EnableEvents = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
If Target.Column = 3 And Target.Row > 19 And Target.Row < 41 Then
findex = Workbooks(1).Worksheets(1).Cells(Target.Row, 3)
End If
Application.EnableEvents = True
End SubGlobal findex As Variant
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Dim suche As Range
Dim suche1 As Range
If Target.Column = 3 And Target.Row > 19 And Target.Row < 41 Then
Set suche = Workbooks(1).Worksheets(1).Range("B2:B30").Find(Cells(Target.Row, Target.Column))
If Not suche Is Nothing And Workbooks(1).Worksheets(1).Cells(Target.Row, 3) <> "" Then
Workbooks(1).Worksheets(1).Cells(suche.Row, 2).Interior.ColorIndex = 3
Else
Set suche1 = Workbooks(1).Worksheets(1).Range("B2:B30").Find(findex)
If Not suche1 Is Nothing Then
Workbooks(1).Worksheets(1).Cells(suche1.Row, 2).Interior.ColorIndex = xlNone
End If
End If
End If
findex = ""
Application.EnableEvents = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
If Target.Column = 3 And Target.Row > 19 And Target.Row < 41 Then
findex = Workbooks(1).Worksheets(1).Cells(Target.Row, 3)
End If
Application.EnableEvents = True
End Sub
[Excel] Formeln mit VBA nutzen
Björn 07.10.2007 - 205 Hits - 2 Antworten
Hlife zu Excel->VBA
majoplinka 06.11.2007 - 76 Hits - 2 Antworten
mehre Excel Arbeitsblaetter in PowerPoint via VBA ansprechen
sammille 12.03.2008 - 100 Hits -
Schnellreferenz Excel VBA
Joshuan 23.05.2008 - 219 Hits - 3 Antworten
VBA-Excel
mentosbasi 28.05.2008 - 349 Hits - 3 Antworten