Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I have a column of cells in a Google Spreadsheet with values such as:

37683
36583
38637
32391

What I would like to do is generate a hyperlink for each cell like:

http://mywebsite.com?id=xxxxx

...where xxxxx is the value of the cell. I know the format of a hyperlink in a Google spreadsheet and could do the job manually, I'm just wondering if I can generate these using a simple find/replace, or whether it will need scripting.

The new hyperlink can either go into the original cell, or a new cell can be created.

Any ideas?

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

Assuming your values are in column A, you can do this in column B:

=HYPERLINK(CONCATENATE("http://mywebsite.com?id=",A1);"link text")

Then you can auto-fill down the rest of the column.

share|improve this answer
    
Of course, and so simple. Thank you. (I think the link should be A1 in your example, not B1, but s/e won't let me make 1-digit edits!) –  Mark Ireland Sep 13 '12 at 17:17
    
You're right. Fixed. (When I was testing this myself I used column B.) –  Al E. Sep 13 '12 at 17:28
    
@AlEverett now how do you create that link in the same cell as the value? And keep the value as the text? –  Kirill Fuchs Oct 12 '13 at 15:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.