ich habe in einem Register eine Artikel Nr. z.b. MA0042 stehen. Nun möchte ich wissen, ob in den anderen noch vorhandenen Registern diese Nummer auch vorkommt!
Wie kann ich das umsetzen in Excel?
Danke
Sub SuchenUndFärben()
Dim i As Integer
Dim Blatt As Worksheet
Dim suchbegriff As String
Dim s As String
Dim Zelle As Range
suchbegriff = InputBox("Geben Sie den Suchbegriff ein!")
If suchbegriff = "" Then Exit Sub
For i = 1 To Application.Workbooks.Count
For Each Blatt In Workbooks(i).Worksheets
Blatt.Activate
Set Zelle = Blatt.Cells.Find(suchbegriff)
If Not Zelle Is Nothing Then
s = Zelle.Address
Do
Zelle.Activate
Zelle.Interior.ColorIndex = 3
Set Zelle = Cells.FindNext(After:=ActiveCell)
On Error Resume Next
If Zelle.Address = s Then Exit Do
Zelle.Interior.ColorIndex = 3
Loop
End If
Next Blatt
Workbooks(i).Activate
Next i
End Sub