0

Surely this can be done easily if you know how to write a macro, sadly I don't so I'm bothering you.

What I'm trying to do is adding a hyperlink to a cell (the link does not change other than the numbers at the end of it, which I have written down in the same cell I'm adding a hyperlink)

I've tried a simple keyboard macro by Copying the cell with the numbers > CTRL+K and writing the Hyperlink part that doesn't change, and pasting the numbers that were copied. However it doesn't work as planned, Excel copies the cell but after pressing CTRL+K it gets removed from the clipboard, Am I doing something wrong or is this something that can be done?

The link that never changes is: http://myanimelist.net/anime/ [The numbers in the sheet goes after /anime/]

Typing it all by hand is simply out of the question, I have close to 5,000 lines to add hyperlink to.

2
  • 1
    What is the code you've tried? You will get better results if you put your attempts here first. Commented Aug 24, 2013 at 13:24
  • this is almost exactly what you are trying to do: stackoverflow.com/questions/18358523/… Try adapting it for your purposes, post the code here if you have trouble/errors with it, and I'd be happy to help. Commented Aug 24, 2013 at 13:28

1 Answer 1

1

You don't need a macro to do that. just use the below formula on the first row and use auto fill to fill the formula to remaining rows. This formula assumes your numbers are in column A.

=HYPERLINK(CONCATENATE("http://myanimelist.net/anime/",A1),A1)
Sign up to request clarification or add additional context in comments.

3 Comments

I see thank you very much, Is it possible to change so the name of the hyperlink becomes the numbers too or is that too much trouble?
@Andy, HYPERLINK has an optional parameter called friendly name. Edited my answer to include it.
Thank you so much, sorry for all the bother

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.