Just copy the code into the VBA editor (alt-F11) in Excel and make sure the sheet with hyperlinks is selected as the active worksheet before running (place cursor in the sub name and press F5). The URLs are placed in the cell next to the cell containing the hyperlink.

Sub GetURL()

  Dim oHyperlink As Hyperlink

  For Each oHyperlink In ActiveSheet.Hyperlinks      oHyperlink.Range.Offset(, 1) = oHyperlink.Address  Next

  Set oHyperlink = Nothing

End Sub

Check out these posts too:

  1. What Every Developer Should Know About URLs
  2. Excel limitations
  3. Using htaccess Files for Pretty URLS
  4. What to expect from cell phones in 2006
  5. Excel 2007 Web Data Add-In
  6. Importing web data into a usable format using Excel
  7. Followup: Convert Excel and PowerPoint to webpage