We'd like to remind Forumites to please avoid political debate on the Forum... Read More »
We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
Help - Linking Advice Needed!
Options

Sweetchuck
Posts: 177 Forumite
in Techie Stuff
I want to create a link in an Excel chart which goes directly to a particular line on a particular webpage. I have the page URL and, after looking at the 'View Source' option on the page, have found the line that I want to link to.
Is there any way I can create the URL so that when it's clicked, it takes you to that page and then skips automatically to the line in question?
I was sure it was possible by using the '#' symbol (eg. fsdfsd.com#line250 or something), but can't figure out exactly how it's done.
I've already tried Google, but because I don't know the exact terminology, I haven't been able to find the answer.
Can anyone help, please?
Is there any way I can create the URL so that when it's clicked, it takes you to that page and then skips automatically to the line in question?
I was sure it was possible by using the '#' symbol (eg. fsdfsd.com#line250 or something), but can't figure out exactly how it's done.
I've already tried Google, but because I don't know the exact terminology, I haven't been able to find the answer.
Can anyone help, please?
0
Comments
-
You have to specify the whole URL, including the #line250. The # bit is called an anchor. E.g.
http://forums.moneysavingexpert.com/faq.html?faq=vb_faq#faq_new_faq_item
In Excel, select the cell where you want the link to appear, then click Insert - Hyperlink. In the Address field, type in or paste the whole URL. In the Text to display field, enter the clickable text, e.g. Click Here. It defaults to the URL itself.0 -
Darn, beaten again!
Also I suggest signing up for www.utteraccess.com
It's free and offers advise on all MS Office stuff.0 -
Chippy_Minton wrote: »You have to specify the whole URL, including the #line250. The # bit is called an anchor. E.g.
http://forums.moneysavingexpert.com/faq.html?faq=vb_faq#faq_new_faq_item
In Excel, select the cell where you want the link to appear, then click Insert - Hyperlink. In the Address field, type in or paste the whole URL. In the Text to display field, enter the clickable text, e.g. Click Here. It defaults to the URL itself.
Cheers, but I already know this part. It's not inserting the URL to Excel which is causing the problem; it's trying to create a link go to a default line when no suitable HTML anchor exists at all. As such, my problem is in IE (well, Firefox, actually) in that when I try to direct a link to a line, it doesn't work.
It's fine if I can go to View Source and find an anchor on that line, but I'm working with extremely long reports which are contained on one single, scrollable page and unfortuantely, there isn't always an anchor available on the relevant line. As it's external websites I'm working with, I have no privileges to insert anchors where appropriate.
In the example you gave of the MSE website, would it be possible, for example, to create a link which would automatically scroll down to line 50 of the page, even if there were no HTML anchor (ie. an "a name" HTML insert)? If so, how would it look?0 -
Bump!0
-
Okay, I now understand better what you're trying to do.Sweetchuck wrote: »In the example you gave of the MSE website, would it be possible, for example, to create a link which would automatically scroll down to line 50 of the page, even if there were no HTML anchor (ie. an "a name" HTML insert)? If so, how would it look?
No, it's not possible because you can only link to a HTML anchor if the anchor exists in the web page itself. There's no way to link to a specific line number. The best you can do is to set the URL to an anchor near the line you want.
Alternatively, you could run an Excel VBA macro which opens the web page and uses SendKeys to scroll to the required line, however this would be quite tricky to do.0 -
Chippy_Minton wrote: »Okay, I now understand better what you're trying to do.
No, it's not possible because you can only link to a HTML anchor if the anchor exists in the web page itself. There's no way to link to a specific line number. The best you can do is to set the URL to an anchor near the line you want.
Alternatively, you could run an Excel VBA macro which opens the web page and uses SendKeys to scroll to the required line, however this would be quite tricky to do.
Ah well, thanks anyway. Was hoping that it might be possible without an HTML anchor. Never mind. Thanks for at least setting my mind at rest!0
This discussion has been closed.
Confirm your email address to Create Threads and Reply

Categories
- All Categories
- 351K Banking & Borrowing
- 253.1K Reduce Debt & Boost Income
- 453.6K Spending & Discounts
- 244K Work, Benefits & Business
- 598.8K Mortgages, Homes & Bills
- 176.9K Life & Family
- 257.3K Travel & Transport
- 1.5M Hobbies & Leisure
- 16.1K Discuss & Feedback
- 37.6K Read-Only Boards