TFCJamieFay
Active Member
- Joined
- Oct 3, 2007
- Messages
- 480
Hi All,
I have a sheet ("Sheet2") with email addresses in column K down to about 300 or so. I want to write a bit of code to add a email hyperlink to each cell. I want the email address as the cell value and I want the subject to be "Report for " & CompanyName
So far I have the following, I'm just missing the important bit!
Many thanks,
Jay
I have a sheet ("Sheet2") with email addresses in column K down to about 300 or so. I want to write a bit of code to add a email hyperlink to each cell. I want the email address as the cell value and I want the subject to be "Report for " & CompanyName
So far I have the following, I'm just missing the important bit!
Code:
Sub AddHyperlinks()
Dim CompanyName As String
With Application
.ScreenUpdating = False
.DisplayAlerts = False
End With
Lastrow = Range("D" & Rows.Count).End(xlUp).Row
Range("K2:K" & Latrow).Select
For Each cell In Selection
cell.Activate
CompanyName = cell.Offset(0, -7).Value
'...Insert code to add hyperlink
Next cell
With Application
.ScreenUpdating = True
.DisplayAlerts = True
End With
End Sub
Many thanks,
Jay
Last edited: