ich hab ein größeres Problem.
Ich möchte Werte aus Spalte A suchen und wenn Wert in Spalte A gefunden wurde in dieser Zelle nach X suchen und Zellen wiedergeben (z.B. Werte in Zelle C9 und C10).
Danke für die Hilfe.
Sub SuchenUndMelden()
On Error GoTo hell
Dim lRow As Long
Dim iCol As Long
Dim sSearch As String
Dim sFind As String
Dim rFind As Range
sSearch = InputBox("Wen genau suchen?")
With ActiveSheet
lRow = .Columns("A:A").Find(What:=sSearch, After:=.Range("A1"), LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Row
iCol = .Cells(lRow, .Columns.Count).End(xlToLeft).Column
For Each rFind In .Range(.Cells(lRow, 2), .Cells(lRow, 45))
If rFind.Value = "" Then
Else
sFind = sFind & rFind.Address & "; "
End If
Next rFind
End With
MsgBox (sSearch & " hat Einträge in: " & sFind)
GoTo heaven
hell:
MsgBox ("Nicht gefunden")
heaven:
End Sub