Cerberuser

Untitled

Jul 3rd, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub LoopColumn()
  2.  
  3.     Dim CurRow As Integer
  4.     Dim CurCol As Integer
  5.     Dim Name As String
  6.    
  7.     CurRow = ActiveCell.Row
  8.     CurCol = ActiveCell.Column
  9.    
  10.     Do
  11.         Name = Cells(CurRow, CurCol).Value
  12.         If Name = "" Then
  13.             Exit Do
  14.         End If
  15.         CurRow = CurRow + 1
  16.     Loop
  17.  
  18. End Sub
  19.  
  20. Sub CreateLink()
  21.  
  22.     Dim CurRow As Integer
  23.     Dim CurCol As Integer
  24.     Dim Name As String
  25.     Dim Year As String
  26.        
  27.     CurRow = ActiveCell.Row
  28.     CurCol = ActiveCell.Column
  29.    
  30.     Year = Cells(CurRow, CurCol + 1).Value
  31.     Name = Cells(CurRow, CurCol).Value
  32.    
  33.     ActiveSheet.Hyperlinks.Add Anchor:=Cells(CurRow, CurCol - 1), Address:= _
  34.         "", TextToDisplay:= _
  35.         "Ññûëêà"
  36.  
  37. End Sub
Advertisement
Add Comment
Please, Sign In to add comment