wie ermittele ich bitte per VBA die erste Zelle des aktiven Arbeitsblattes die
.Interior.Color = 13071265 hat?
Bsp. Ergebnis "T15"
Gruß,
Sergej
Option Explicit
Sub FarbeZelle()
Dim LoI As Long
For LoI = 1 To Rows.Count
If Cells(LoI, 20).Interior.Color = 13071265 Then
MsgBox LoI
Exit For
End If
Next
End Sub
Sub FarbeZellebedingt()
Dim LoI As Long
For LoI = 1 To Rows.Count
If Cells(LoI, 20).DisplayFormat.Interior.Color = 13071265 Then
MsgBox LoI
Exit For
End If
Next
End Sub
Option Explicit
Sub FarbeZelle()
Dim LoI As Long
For LoI = 1 To Rows.Count
If Cells(LoI, 20).Interior.Color = 13071265 Then
MsgBox LoI
Exit For
End If
Next
End Sub
Sub FarbeZellebedingt()
Dim LoI As Long
For LoI = 1 To Rows.Count
If Cells(LoI, 20).DisplayFormat.Interior.Color = 13071265 Then
MsgBox LoI
Exit For
End If
Next
End Sub
Option Explicit
Sub findColor()
Dim rngArea As Range, ocell As Range
Set rngArea = ActiveSheet.UsedRange
Const INT_COLOR As Long = 13071265
For Each ocell In rngArea
If ocell.Interior.Color = INT_COLOR Then MsgBox ocell.Address: Exit Sub
Next
End Sub
VGDie erweiterte Suchfunktion hilft dir, gezielt die besten Antworten zu finden
Suche nach den besten AntwortenEntdecke unsere meistgeklickten Beiträge in der Google Suche
Top 100 Threads jetzt ansehen