Sub 分离A列数据的文本和超链接并会同其他数据整理到指定表()
ier = Worksheets("数据库").Range("b60000").End(xlUp).Row
For ee = 5 To Range("a60000").End(xlUp).Row
For Each hh In Worksheets("临时").Hyperlinks
If hh.TextToDisplay = Cells(ee, 1) And Cells(ee, 1) <> "" Then
www = www & "," & ee
End If
Next
Next
www = Right(www, Len(www) - 1)
zxc = Split(www, ",")
For sd = 0 To UBound(zxc) - 1
For wee = zxc(sd) + 1 To zxc(sd + 1) - 1
Worksheets("数据库").Cells(sdf + ier + 1, uu + 4) = Cells(wee, 1)
uu = uu + 1
Next
sdf = sdf + 1
uu = 0
Next
For Each hhh In Worksheets("临时").Range("A6:A6000").Hyperlinks
Worksheets("数据库").Cells(ier + 1, 2) = hhh.TextToDisplay
Worksheets("数据库").Cells(ier + 1, 3) = hhh.Address
Range(Worksheets("数据库").Cells(ier + 1, 3), Worksheets("数据库").Cells(ier + 1, 3)).Hyperlinks.Add Anchor:=Worksheets("数据库").Cells(ier + 1, 3), Address:=Worksheets("数据库").Cells(ier + 1, 3)
ier = ier + 1
Next
End Sub
|
|
susan