Excel VBA code to input data into website and then return the result.

excli23456

New Member
Joined
Jan 9, 2023
Messages
1
Office Version
  1. 2021
Platform
  1. Windows
Hi all,

I am trying to create some Excel VBA code to automate finding out the distance from coast of 3000 sets of co-ordinates that I have in Excel, my VBA knowledge is very limited.
I am planning on using the following website and was wondering if anyone had any idea of how to automate this process using VBA on Excel, or point me in the right direction.
Distance to coast

Thanks
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Some mathematician would be better for this. But with my limited geometry knowledge, I would write a formula like below:
min(destination_pointX-target_datasetX)²+min(destination_pointY-target_datasetY)²=routute²
 
Upvote 0
My first suggestion won't work since it will cobine any X point with any Y point. But each coordinate has specific X/Y points. I will prepare an example for you. I have something in mind. It is a bit heuristic but will work.
 
Upvote 0
But I think this is not the thing you are after. You are looking for a solution to run this file on the website. This won't be a practical application.
A better solution would be to read CSV file and convert it to json via JS and make the necessary calculations inside the browser with JS. Which are not the scope of this forum. I can help you further if you write from private messaging.
Also, I am sharing the optimized version of my file for 3000 rows:
But I don't think there is a practical way to run this file on a website.
 
Last edited by a moderator:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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