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.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,303
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
 

Forum statistics

Threads
1,141,220
Messages
5,705,091
Members
421,378
Latest member
CarlosDuran

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top