以下代碼可循環訪問一列范圍數據,並將每個條目轉換為一個電子郵件地址。
Dim convertRng As Range
'Change the range to suit your need.
Set convertRng = Range("Z1:Z99")
Dim rng As Range
For Each rng In convertRng
If rng.Value <> "" Then
ActiveSheet.Hyperlinks.Add rng, "mailto:" & rng.Value
End If
Next rng