Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Business Applications
Tag Cloud
access acer asus batch bios bsod crash desktop driver drivers error ethernet excel freeze gaming gpu hard drive hardware hdmi internet laptop malware memory monitor motherboard netgear network printer problem ram registry router server slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Software & Hardware > Business Applications >
Excel 2007 Hyperlink Macro

Reply  
Thread Tools
firzhugh's Avatar
Computer Specs
Junior Member with 3 posts.
 
Join Date: Nov 2009
Experience: Intermediate
20-Nov-2009, 12:49 PM #1
Excel 2007 Hyperlink Macro
Hi, I have got an Excel spreadsheet which has incident numbers in column A. For each of these incidents I need to put in hyperlinks which are very very similar. The first part of the hyperlink is the address to the database and the second part is the Incident number itself. I'm trying to create a macro which automates the process of putting in the hyperlink plus the incident number in. Can this be done?
computerman29642's Avatar
Computer Specs
Senior Member with 2,794 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
20-Nov-2009, 02:55 PM #2
Welcome to the forum.

I am sure what you want can be done. Would it be possible for you to attach a copy of the workbook (remove senisitive data with dummt data)?
Rollin_Again's Avatar
Senior Member with 4,273 posts.
 
Join Date: Sep 2003
Location: Atlanta, GA - Planet Earth
Experience: Brilliant When Sober
20-Nov-2009, 08:24 PM #3
Are the hyperlinks going to be replacing the data in column A or will you be putting them into an adjacent column? Can you provide us with a sample hyperlink address??

Regards,
Rollin
firzhugh's Avatar
Computer Specs
Junior Member with 3 posts.
 
Join Date: Nov 2009
Experience: Intermediate
21-Nov-2009, 12:35 PM #4
Hi, thanks for your replies. I don't want to replace the text or put it in another column, I just want the macro to add a hyperlink to the incident number with a link which looks similar to: http://www.database.com/file?123456. The only thing that changes in these links is the incident number which are in column A. I attach a sample spreadsheet.

Thanks for your help
Attached Files
File Type: xlsx Daily Production.xlsx (13.0 KB, 109 views)
Rollin_Again's Avatar
Senior Member with 4,273 posts.
 
Join Date: Sep 2003
Location: Atlanta, GA - Planet Earth
Experience: Brilliant When Sober
22-Nov-2009, 09:54 PM #5
Try the code below. Just change the number in red to reflect your true starting row number.

Code:
Sub AddHyperlinks()
    
For i = 2 To Cells(Rows.Count, "A").End(xlUp).Row

ActiveSheet.Hyperlinks.Add Anchor:=Range("A" & i), Address:= _
        "http://www.sampledatabase.com/file?" & Range("A" & i).Value

Next i
    
End Sub
Regards,
Rollin
firzhugh's Avatar
Computer Specs
Junior Member with 3 posts.
 
Join Date: Nov 2009
Experience: Intermediate
23-Nov-2009, 04:43 AM #6
Thanks very much!!!
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:00 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.