ich hatte von euch mal ein sehr hilfreiches makro bekommen.
mittels button werden die ganzen arbeitsblätter durchsucht.
die fundstelle wird mit gelb markiert.
kann man das makro so erweitern, dass die zelle ihre ursprungliche
formatierung nach dem verlassen beibehält?
hier der makro:
Option Explicit
Public strSuch As String
Sub Suchen_alle_Tab()
Dim wks As Worksheet
Dim rng As Range
Dim strAddress As String, strFind As String
strFind = InputBox("Bitte Suchbegriff eingeben:", Application.UserName, strSuch)
If strFind = "" Then Exit Sub
For Each wks In Worksheets
Set rng = wks.Cells.Find(strFind, lookat:=xlPart, LookIn:=xlFormulas)
If Not rng Is Nothing Then
strAddress = rng.Address
Do
wks.Range(rng.Address).Interior.ColorIndex = 6
Application.Goto rng, False
If MsgBox("Weiter", vbYesNo + vbQuestion) = vbNo Then
Range(rng.Address).Interior.ColorIndex = xlNone
Exit Sub
End If
Range(rng.Address).Interior.ColorIndex = xlNone
Set rng = Cells.FindNext(After:=ActiveCell)
If rng.Address = strAddress Then Exit Do
Loop
End If
Next wks
strSuch = strFind
MsgBox "Keine weiteren Fundstellen!", False, Application.UserName
Worksheets(1).Activate
Range("A1").Select
End Sub
herzlichen dank im voraus