Hello, I'm fairly new to the VBA side of Excel so I'm hoping this question involves an easy answer. Anyway here goes:
I have a cross reference sheet of roughly 200 cities and the distances between them; the data is roughly layed out like this:
xxxxx city1 city2 city3
city1 0000 0580 1296
city2 0580 0000 3914
city3 1296 3914 0000
(the extra 0's are hopefully going to align this better)
Anyway, my goal is to write a program to have a function that doesn't need the current sheet as a reference. I'm attempt so all you have to do is type:
=Distance(city1, city2)
and have the distance displayed.
My vague memory of c++ give me the idea of writing something like this:
Select Case city1 = Atlanta
Case is city2 = Billings
Distance = 1200
Case is city2 = Detroit
Distance = 1680
ect...
Though, my lack of knowledge with VBA is preventing me from even passing text through as a String.
Any help with this would greatly be appreciated.
-John
Bookmarks