AW: Korrigiere mich: Dann aber entweder nur mit ...
22.07.2014 09:34:10
Ralf P.
Das verhält sich doch recht eigentümlich..
Naja, wieder was gelernt.
Ich suche eigtl nicht in ausgeblendeten Bereichen.
Gruß
Ralf
Option Explicit
Sub luc_wills_wissen()
Dim Rng1 As Range
Dim Rng2 As Range
Dim Suche As Range
Cells.Delete
Set Rng1 = Cells(10, 8)
Set Rng2 = Rng1.Offset(2, 5)
Rng1 = "luc_wills_wissen"
Rng2.FormulaR1C1 = "=COUNTIF(R1C1:R10C8,""luc_wills_wissen"")"
Range(Rows(1), Rows(100)).Hidden = True
Set Suche = Nothing
Set Suche = Cells.Find("luc_wills_wissen") ', LookIn:=xlValues, lookat:=xlWhole, MatchCase:= _
True)
MsgBox "TextMatchSuche: " & Suche.Address & vbTab & Suche.Value
Set Suche = Nothing
Set Suche = Cells.Find("wills") ', LookIn:=xlValues, lookat:=xlPart, MatchCase:=True)
MsgBox "TextTeilSuche: " & Suche.Address & vbTab & Suche.Value
Set Suche = Nothing
Set Suche = Cells.Find("luc_wills_wissen", after:=Range("H10"), LookIn:=xlFormulas, lookat:= _
xlWhole, MatchCase:=True)
MsgBox "FormelMatchSuche: " & Suche.Address & vbTab & Suche.Value
Set Suche = Nothing
Set Suche = Cells.Find("wills", LookIn:=xlFormulas, lookat:=xlPart, MatchCase:=True)
MsgBox "FormelTeilSuche: " & Suche.Address & vbTab & Suche.Value
Set Suche = Nothing
End Sub