I am VERY new to Macro's and unfortunately don't use them enough, I apologize ahead of time if I am not explaining this correctly. I have spreadsheets that require me to insert hyperlinks to certain documents that are in different folders in Dropbox. The documents are all formatted in VOLUME.PAGE format, the spreadsheets all have a column for the volume (K) and a column for the page (L). This is the macro that I use which works fine but I have to run in each cell separately which takes time when the spreadsheet is larger. Is there a way to change the macro so that I don't have to apply to each cell individually?
VBA Code:
Sub setHyperlink()
Dim nmbRow, nmbCols As Integer
Dim strFullPath, strA1, strB1, strFT, strFolder, strHPL, strHPLO As String
nmbRow = 0
nmbCols = 1
strA1 = ActiveCell.Text
strB1 = ActiveCell.Offset(nmbRow, nmbCols).Text
strFT = ".pdf"
strFolder = "file:///Users/wordsherrill/Dropbox/COUNTY/Wells Area/14S14E Section/Documents/"
strFullPath = strFolder & strA1 & "." & strB1 & strFT
strHPL = "=hyperlink(" & """" & strFullPath & """,""" & strA1 & """)"
strHPLO = "=hyperlink(" & """" & strFullPath & """,""" & strB1 & """)"
ActiveCell.Formula = strHPL
ActiveCell.Offset(nmbRow, nmbCols).Formula = strHPLO
End Sub