Doppelte anlisten
05.08.2008 11:05:00
Petra
Thema ist bestimmt schon oft durchgekaut, habe aber trotzdem nichts passendes gefunden.
Ich habe eine Tabelle (ca. 10.000 Zeilen), in einer Spalte sind Materialnummern (60 stellig). Folgendes Makro funktioniert nicht, da Excel die Nummern (obwohl als Text formatiert) als Zahl interpretiert.
Sub DoppelteRaus()
Application.EnableEvents = False
Dim i As Integer, iRows As Integer, d
d = 2
iRows = Cells(Cells.Rows.Count, 19).End(xlUp).Row
For i = iRows To 1 Step -1
If WorksheetFunction.CountIf(Columns(19), Cells(i, 19)) > 1 Then
Sheets("Prüflist").Cells(d, 3).Hyperlinks.Add Anchor:=Sheets("Prüflist"). _
Cells(d, 3), _
Address:="", SubAddress:="Tabelle1!" & Cells(i, 8).Address, _
TextToDisplay:="Tabelle1!" & Cells(i, 8).Address
d = d + 1
End If
Next i
Application.EnableEvents = True
End Sub
wie muß ich das Makro anpassen, das das Makro die Zahlenreihen als Text interpretiert?
Liebe Grüße
Petra
Anzeige