View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Matt Pierringer Matt Pierringer is offline
external usenet poster
 
Posts: 9
Default Appending Hyperlink to existing text at certain start row

Ok my code works great except I need to start at row 11, I am not sure
how to keep it so I am only going through the current range of column
a and to be able to start at a specified row
Here is my code:
Sub TextWithAppendedHyperlink()
Dim cell As Range
Dim txt$, url$
Dim colorTxt, colorUrl&

For Each cell In Worksheets(1).UsedRange.Columns(1).Cells
If cell < "" And cell.Offset(0, 11).Value < "" Then '
url = cell.Offset(0, 11).Value '"http://www.google.com"
colorUrl = ActiveWorkbook.Styles("Hyperlink").Font.Color
cell.Hyperlinks.Add _
Anchor:=cell, Address:= _
url, TextToDisplay:=Trim(cell.Value)
End If
Next
End Sub

Thanks for any help, It is much appreciated!