Using cell's contents as part of URL in hyperlink?

hhobba

New Member
Joined
Jun 8, 2006
Messages
15
Hi there!

I'm looking to find a way of using a cell's contents as part of a dynamic hyperlink. Eg. if i had lots of different code numbers in a column, and I wished to load the page "www.examplesite.com/code.php?code=XXXX" where XXXX was the content of an adjacent cell, how would I go about doing this, if it is even possible at all?

I.e. if I had the following spreadsheet:

A1 = "01" and B1 = "Click here to launch page 01"
A2 = "02" and B2 = "Click here to launch page 02"
A3 = "03" and B3 = "Click here to launch page 03"

You could see how the cells in column B would benefit from a "dynamic URL" whereby the url could specify that code.php?code=A1 or A2 or A3.

Sorry if this is hard to understand, and MANY thanks for any answers.
 

Some videos you may like

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,811
Office Version
  1. 365
Platform
  1. Windows
Why not take a look at the HYPERLINK worksheet function?

=HYPERLINK("http://www.examplesite.com/code.php?code="&A1,"Click here to launch page"&A1)

EDIT: Missed the http//. :oops:
 

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
I made a real working example

  A                                              B                         
1 http://www.mrexcel.com/board2/viewtopic.php?p=                           
2 1122544                                        go to post number 1122544 
3 1122545                                        go to post number 1122545 
4 1122546                                        go to post number 1122546 
5 1122547                                        go to post number 1122547 
6 1122548                                        go to post number 1122548 

sheet1

[Table-It] version 06 by Erik Van Geit
Code:
RANGE FORMULA (1st cell)
B2:B6 =IF(A2="","",HYPERLINK($A$1&A2,"go to post number " & A2))

[Table-It] version 06 by Erik Van Geit

you can hide column A
 

Watch MrExcel Video

Forum statistics

Threads
1,108,624
Messages
5,523,965
Members
409,547
Latest member
AW2020

This Week's Hot Topics

Top