Return Data from Specific URL from Cell in Worksheet

rafilip

New Member
Joined
Jul 9, 2015
Messages
4
I believe I have thoroughly researched this question (sorry if you have seen the answer, please be patient with me).
Truly a newcomer to VBA/Macros and do not even fully understand where to "put" the codes that are provided in these message boards, that is why I prefer a formula.
My sheet has cells which feed to a hyperlink (i.e. A1=JFK, B1=CVG, C1=HYPERLINK("Great Circle Mapper"&A1&"-"&B1,"My Flight").
If you visit the link (Great Circle Mapper) it shows the flying distance between these two points - 589 mi.
What I am trying to do is do a web query in Excel based off the link provided in cell C1, and then have the web query point to the total distance included in the link - and then populate another cell on my sheet (D1) with that distance.
Any and all help would be appreciated!

n.b. - posted this on another message board several months ago, it got removed, now reposted there and posted here as well - sorry if it's a duplicate - if I have to, I will remove from other forum.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Upvote 0
Hi rafilip,
mmm, okay, I don't have time for it now, but can try to see if I can create some code. Another solution: create for yourself a table of airports you use with lat&lon, use a VLOOKUP to lookup the lat & lon and then calculate the distance in Excel:
http://www.mrexcel.com/forum/excel-...ce-between-two-latitude-longitude-points.html
It only requires a bit of manual labour to collect the lat & lon of all the airports, no VBA whatsoever :).
Cheers,
Koen
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,885
Members
452,364
Latest member
springate

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
Back
Top