Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing Mapquest info from Excel
I need to have excel get driving directions from Mapquest and place them in
a cell. Currently, what I am doing is to have the following in a cell (anyNum and AnyStreet are actually my address num and street) and col F-I are ClientsAddressNum, ClientsAddress2, ClientsCity and ClientsST =IF(LEN(TRIM(G124))0,"http://www.mapquest.com/directions/main.adp?go=1&do=nw&rmm=1&un=m&cl=EN&ct=NA&rsres=1 &1ffi=&1l=&1g=&1pl=&1v=&1n=&2ffi=&2l=&2g=&2pl=&2v= &2n=&1pn=&1a=AnyNum+AnyStreet+Rd&1c=Castro+Valley& 1s=ca&1z=&2pn=&2a=" & F124 & "+" & SUBSTITUTE(G124," ","+") & "&2c=" & SUBSTITUTE(H124," ","+") & "&2s=" & I124 & "&2z=&r=f","") This gives me a link that I can cut and paste (works pretty good) Then I need to go to PRINTER FRIENDLY then cut the directions on that page, come back to excel, and paste them in to a cell, the (wanting to keep everything on one line ) change the format to wordwrap off (which it was before) I then get the travel time and miles into 2 different cells using =IF(ISBLANK(BA124),"",VALUE(MID(BA124,SEARCH(" Total Est. Distance",BA124) + 21,SEARCH(" miles ",BA124) - (SEARCH(" Total Est. Distance",BA124) + 21)))) and =IF(ISERROR(VALUE(MID(BA124,SEARCH("Total Est. Time:",BA124)+16,SEARCH("Total Est. Distance:",BA124)-(SEARCH("Total Est. Time:",BA124)+24)))),"",VALUE(MID(BA124,SEARCH("To tal Est. Time:",BA124)+16,SEARCH("Total Est. Distance:",BA124)-(SEARCH("Total Est. Time:",BA124)+24)))) BA is the column I cut and paste the directions into I am looking for a way that will automate the results a little more. Thanks Bruce |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Question About Accessing Web Info Using R1C1 | Excel Worksheet Functions | |||
Can i link Mapquest to my spreadsheet? | Excel Discussion (Misc queries) | |||
Mapquest Web Query issue | Excel Programming | |||
Can I link Mapquest to MS Excel or Outlook | Excel Discussion (Misc queries) | |||
LINKING Address cells from an EXCEL spreadsheet to fill MapQuest Address Info | Excel Programming |