AW: unterstichene Werte aus Tabelle auslesen
10.03.2008 11:36:22
Tino
Hallo,
habe hier mal ein Beispiel aufgebaut.
Sucht in Spalte A nach unterstrichenen Zellen und schreib diese in Spalte B.
Option Explicit
Sub Makro1()
Dim Zelle As Range, Zähler As Long, MerkZ As String
Dim a As Long
With Application.FindFormat.Font
.Subscript = False
.Underline = xlUnderlineStyleSingle
End With
Set Zelle = Columns("A:A").Find(What:="", LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=True)
If Zelle Is Nothing Then Exit Sub
Zähler = Zähler + 1
MerkZ = Zelle.Address
Cells(Zähler, 2) = Zelle
For a = 1 To 10000
Zähler = Zähler + 1
Set Zelle = Columns("A:A").Find(What:="", After:=Zelle, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=True)
If Zelle.Address = MerkZ Then Exit Sub
Cells(Zähler, 2) = Zelle
Next a
End Sub
Gruß
Tino