View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dav Dav is offline
external usenet poster
 
Posts: 1
Default Can anyone see a problem with this?


The easy way is to change you data to like a mileage table in an atlas

eg
A1 A B C D
A 0 12 7 9
B 12 0 15 6
C 7 15 0 16
D 9 6 16 0

with the mileage in the cells

if A B C D are the places
Then you just use an offset formula if the table has cell a1 where i
have coloured ir red offset
($a$1,match(G1,a2:a5,0),match(h1,b1:e1,0)) would return the value

where h1 is the starting place and g1 the finish, or the other way
round it does not really matter!

An index function does a similar thing to the offset and match so that
is another option. the table approach means you have to type less as
well
N/A is returned if there is no match

Regards

Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=559359