Wie kann ich in einer bestimmten Zeile alle verwendeten Spalten nach einem Eintrag in einer Zelle durchsuchen?
Gruss
ISha
Option Explicit
Public Sub Suchen()
Dim rZelle As Range
Dim sSuchbegriff As String
Dim lZeile As Long
Application.ScreenUpdating = False
lZeile = 3 ' die abzusuchende Zeile gg. anpassen !!!
sSuchbegriff = InputBox("Wonach möchten Sie suchen?")
If sSuchbegriff = "" Then Exit Sub
With Worksheets("Tabelle1").Rows(lZeile) ' <== Tabellenblattnamen ggf. anpassen !!!
Set rZelle = .Find(sSuchbegriff, LookAt:=xlWhole, LookIn:=xlValues)
If Not rZelle Is Nothing Then
MsgBox " Der Begriff """ & sSuchbegriff & """ steht in Zelle " & _
rZelle.Address(0, 0) & ".", _
, " Information für " & Application.UserName
Else
MsgBox " Der Begriff """ & sSuchbegriff & """ wurde NICHT gefunden.", _
48, " Information für " & Application.UserName
End If
End With
Application.ScreenUpdating = True
End Sub