GOOGLEMAPS Function - Google Sheets Tutorial - How to Get Distance & Time Live Data to Spreadsheets

Поделиться
HTML-код
  • Опубликовано: 29 авг 2024

Комментарии • 233

  • @cemayorca
    @cemayorca 2 года назад +6

    5 years later and this video is still valid. It's direct, to the point, easy, and it works. Thank you.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 года назад

      Great to hear!

    • @marcusshamase2050
      @marcusshamase2050 Год назад

      Please tell me if one can use this method and wants to get driver real time data. Will that update on spread sheet?

    • @rajkumarmahorkar5075
      @rajkumarmahorkar5075 Год назад

      ​@@ExcelGoogleSheets, Getting error, Please let me know how to fix it ??

  • @ryanpeterson7998
    @ryanpeterson7998 4 года назад +6

    i just wanted to say thanks!!!!!!!!! i use this for my daily dispatch of 100+ stone and asphalt trucks. Its a great help tracking driver productivity

  • @FurqanAhmed-qi1ls
    @FurqanAhmed-qi1ls 2 месяца назад +1

    Best guy ever. Had been trying to get this for so long. Finally got this video. Love you man.

  • @alfredomorales3017
    @alfredomorales3017 3 года назад +3

    This works very well! I was able to save myself too much time by searching for distances and times directly on Google Maps! Thank you a lot

  • @J0NCL0UD
    @J0NCL0UD 2 года назад

    I tried this out without expecting myself to make it work. I MADE IT WORK! Thanks for the great video!

  • @McGeeMadness
    @McGeeMadness 10 месяцев назад

    Thank you so much for digging me out of the rabbit hole of finding this solution! Works perfectly.

  • @benjamins8582
    @benjamins8582 3 года назад +4

    Thank you very much. You saved me alot of time! Greetings from Germany!

  • @Toledocob769
    @Toledocob769 3 года назад +2

    all I can say is WOW!!!!!!!!!!!! thanks! so cool and easy the way you show and explain. I download what you mentioned and toggled back and forth from your video to the sheet. Wonderful.

  • @casianreport3318
    @casianreport3318 4 года назад

    This script still works fine. No problem with him!

  • @margaridagoulart1270
    @margaridagoulart1270 4 года назад +2

    You just saved my occupational medicine thesis! Thanks a LOT! I'm subscribing to support you and will go to your channel for all my questions on Google tools.

  • @poppindecorballoonco.5733
    @poppindecorballoonco.5733 3 года назад +3

    This works great, I am not very familiar with scripts, but this was a super easy tutorial! Thanks for sharing.

  • @narlycharley
    @narlycharley 2 года назад +1

    This was a GREAT tutorial! Thank you for assembling this.

  • @dustinrochette
    @dustinrochette 5 лет назад +5

    First of all, I'd like to thank you for this video. As an inexperienced coder, I'm trying to figure out how to get the walking times as well. Any help would be greatly appreciated.

    • @flotze
      @flotze 5 лет назад

      Hi Dustin, any luck in figuring out walking distances/times? Thanks

    • @swaroopinii
      @swaroopinii 4 года назад

      There are specific add ons to the function you can use. Try
      var mapObj = Maps.newDirectionFinder()
      .setDepart(new Date(2020,2,3,9,0,0,0,0))
      .setMode(Maps.DirectionFinder.Mode.TRANSIT) (or WALKING in your case)

    • @lassenrgaard1306
      @lassenrgaard1306 Год назад

      @@swaroopinii where in the function is to be pasted?

  • @demonofshadows9199
    @demonofshadows9199 2 года назад +3

    is there a way to save a cache to avoid the error message "Service invoked too many times for one day" ?

  • @KadirSahinTR
    @KadirSahinTR 3 года назад

    Thank you so much.
    I wanted to make a trip plan for the summer, this function will be very useful for me.

  • @Andremartinsss
    @Andremartinsss 10 месяцев назад

    greetings from Brazil 👊, you helped me a lot!!!

  • @ceorockster876
    @ceorockster876 4 года назад +2

    I Love you! This is the best channel ever!

  • @Charles242701
    @Charles242701 3 года назад

    Thank you so much! You've made my manager (and therefore, me) very happy haha

  • @thoughtprovoking001
    @thoughtprovoking001 3 года назад

    Thankyou! This saved me a tonne of time and effort!

  • @Gdenariwoo
    @Gdenariwoo 2 года назад +2

    First of all thank you so much for getting this video out! I just opened my google sheets and all my "Minutes" and "Miles" results have a #ERROR! on them. Was there an update that's making everything wonky?

  • @gbpferrao
    @gbpferrao 2 года назад

    you are our savior

  • @ZahratAlafrah
    @ZahratAlafrah 5 месяцев назад

    Thank you for this explanation .... We have a problem... Exception: Service invoked too many times for one day: route

  • @CtrlAltFoxy
    @CtrlAltFoxy Год назад +1

    Wow! Really easy and is still working for me! Thanks. If there is also a way to show the driving directions in an embedded map or link, it would be appreciated.

  • @adamtheclark75
    @adamtheclark75 3 года назад

    Script works great. Thank you so much!

  • @RichPober
    @RichPober 8 месяцев назад +1

    Excellent tool - thanks.

  • @victorpinasarnault7910
    @victorpinasarnault7910 Год назад +1

    If you are watching this in 2022, the script editor become Apps Script and it is in 'EXTENSIONS'.

  • @trafficsystem533
    @trafficsystem533 3 года назад

    Been looking for this thanks very much!

  • @SKINNYDADDY25
    @SKINNYDADDY25 Год назад

    It still works but Google made some changes it looks like. The script editor is no longer under Tools, it's under Extensions as App Script. Another thing, I noticed is that App Script would not load with my regular Gmail Google Sheets but it works perfectly fine using my Gsuite domain Google Sheets

  • @willsgrandad
    @willsgrandad 3 года назад

    Thanks, worked for me. Using UK post codes.

  • @mosl2te
    @mosl2te 4 года назад

    This is a great function! Thank you!!!

  • @Warezney7
    @Warezney7 4 года назад +1

    Thanks!!!!!! i love this script!! :)

  • @shantanumohile
    @shantanumohile 4 года назад +2

    Thank you so much!!

  • @jonnyesse
    @jonnyesse 3 года назад +1

    Thank you! Great.

  • @SibenduJena
    @SibenduJena Год назад

    first time in youtube i am able to found out to find all the distance

  • @umarfarooq8038
    @umarfarooq8038 5 лет назад

    Thanks! Worked for our solar firm....

  • @thehollawalls2276
    @thehollawalls2276 4 года назад

    Thankyou you are such a great blessing

  • @robwithano7147
    @robwithano7147 2 года назад

    Thanks for making it so easy

  • @paulstratton8149
    @paulstratton8149 Год назад

    How do I overcome the "Exception: Service invoked too many times for one day: route. (line 14)." Error message? I'm trying to create a distance grid of 31 addresses to use to solve a "traveling salesman problem". I really like how this was created and tested. Your method was very educational for me!

  • @aparyee
    @aparyee 4 года назад +5

    This worked great, but for some reason now a year later it doesn't seem to work, says Invalid argument origin (line 16, file "code")

    • @maxrodgers5702
      @maxrodgers5702 4 года назад

      Same here!

    • @casianreport3318
      @casianreport3318 4 года назад

      you must tune up the code. from time to time probably google change order of the arrays

    • @elisabethcai-pippin3063
      @elisabethcai-pippin3063 4 года назад +1

      @@casianreport3318 What would be the new arrays?

    • @ArpanPatel108
      @ArpanPatel108 3 года назад

      @@elisabethcai-pippin3063 yeah does anyone have the working code?

  • @baxabella362
    @baxabella362 Год назад

    Thank you so much...This one really works..Very3x useful

  • @steccaman73
    @steccaman73 4 года назад

    It works great! Thank you!

  • @mbh1156
    @mbh1156 2 года назад +1

    Hi im getting Exception: Service invoked too many times for one day: route. do you have any workaround for this? thank you

  • @canifail4098
    @canifail4098 11 месяцев назад

    thank you so much, it works! I wonder if there is anything we can add to that script to say "generate the miles for the SHORTEST route" for example, when we search any address in Maps, Google gives several routes, one is usually always less miles. maybe a script could somehow pick up the "shortest miles distance" route?

  • @nursultanmavlianbekuulu9420
    @nursultanmavlianbekuulu9420 3 года назад +2

    Thank you so much for the script it’s really useful!
    Is there any way to calculate multiple stops and also when some of formulated cells empty still calculate rest of the locations ?

  • @Cardilse
    @Cardilse 2 года назад

    i am getting this error please help.
    (Exception: Service invoked too many times for one day: route. (line 18).)

  • @vYourCompany
    @vYourCompany 3 года назад

    Thank you so much! you a great!

  • @DaveTavres
    @DaveTavres 3 года назад +1

    @LearnGoogleSpreadsheets - thank you so much for so many great tutorials. Any chance you have figured out how to use the Google Maps API to update a Google map from a Google spreadsheet?

  • @justint2829
    @justint2829 2 года назад

    thank you!!! exactly what im looking for. is there a way to add avoidance such as "Tolls"?

  • @davidcoyne5785
    @davidcoyne5785 3 года назад +2

    Thanks so much for this - very helpful.
    When I opened the sheet the day after I ran it first, it gave me this message...."Exception: Service invoked too many times for one day: route. (line 113)." - any thoughts to fix it?

    • @erixcoachandcar
      @erixcoachandcar 3 года назад

      How do we fix this?

    • @johanntrompat
      @johanntrompat 2 года назад

      Me to.

    • @s2paklab
      @s2paklab 2 года назад

      i have similar issue. Exception: Service invoked too many times for one day: route. (line 18). did you fix yours?

    • @johanntrompat
      @johanntrompat 2 года назад

      For fixe this, you must by a offer to Google. In fact, you can't calculated more than 2500 opération per day.

  • @sriharsharevu4316
    @sriharsharevu4316 3 года назад +1

    Subscribed dude..

  • @alexzhang5816
    @alexzhang5816 2 месяца назад

    Hi, rather than getting the distance from 2 places, is it possible to get a screenshot of the map of an address within the cell?

  • @qaseemr
    @qaseemr 5 лет назад +7

    can you add a depart or arrive by time? then calculate miles and minutes according to that

    • @SamClarkOfficial
      @SamClarkOfficial 4 года назад

      I would really like to be able to do this also.

    • @swaroopinii
      @swaroopinii 4 года назад

      Try this
      var mapObj = Maps.newDirectionFinder()
      .setDepart(new Date(2020,2,3,9,0,0,0,0)) ---> Or setArrive in your case
      .setMode(Maps.DirectionFinder.Mode.TRANSIT)

  • @dirtychurdi
    @dirtychurdi 3 года назад +1

    Does anyone know how to use this Function in an ARRAYFORMULA? If I try to use GOOGLEMAPS(A2:A,B2:B,"miles") i only get the first row's calculation.

  • @gravelhub3429
    @gravelhub3429 3 года назад

    Great video thanks for sharing

  • @torukmakto0
    @torukmakto0 2 года назад

    Awesome work, thank you

  • @bicycler
    @bicycler 3 года назад +1

    Any way to get public transit travel duration?

  • @greatbigfamilyproductions8430
    @greatbigfamilyproductions8430 8 месяцев назад

    Is it possible to accomplish this same thing with just zip codes instead of addresses? I tried just using zip codes but get errors. It works fine with addresses. Let me know what I need to do to fix this. Thanks!

  • @oliviermanbode4788
    @oliviermanbode4788 2 года назад

    Very useful.Thanks for sharing..:)

  • @tedbuck2308
    @tedbuck2308 3 года назад

    Thank you!

  • @edgardoaaroncabreraduran1441
    @edgardoaaroncabreraduran1441 5 лет назад +2

    Using coordinates is the same? Thanks

  • @visarr
    @visarr Год назад

    I haven't found that the duration (in minutes) changes appropriately to real time. Currently, the calculation is 18 minutes; however, when I go to Google Maps, there's a lot of red and it shows 26 minutes.

  • @beybeatruths
    @beybeatruths Год назад

    yes, this is awesome. My only concern is that when I go to add a new row via an app to google sheets. The miles don't read to that column. Is there a way to add the script to upcoming columns without doing it manually or no?

  • @MissNanetFowl
    @MissNanetFowl 6 лет назад +1

    Very confusing. For some addresses I get only km but shows error for miles, while for the others only hours can be calculated

  • @ldevs430
    @ldevs430 6 лет назад

    Great video, really helped. Also with the km, You could just converter the mile result into km?

  • @olivierbaudry4004
    @olivierbaudry4004 4 года назад +1

    Bravo !
    Can we get the latitude and the longitude? I think it s possible, could you explain it?

  • @agungwibisono6147
    @agungwibisono6147 Год назад

    Thanks for your video, i'm corius how we can get toll prices after we know the distance? Please your answer. Thank you

  • @Alexking900
    @Alexking900 5 лет назад +2

    TypeError: Cannot read property "legs" from undefined. (line 20, file "Code")
    Dismiss
    can you tell me how to solve

  • @user-jh5zf7rd2h
    @user-jh5zf7rd2h Год назад

    Exception: Service invoked too many times for one day: premium route. (line 18). Getting this error in Google sheet, Please let me know how can I fixed it.

  • @TheDervMan
    @TheDervMan 9 месяцев назад

    This script has recently stopped working for me. I'm getting a "Invalid Argument: origin" on line 18 "mapObj.setOrigin(start_address);" I'm wondering if it's linked to the recent V8 migration.

  • @ibindo-weinnovatebuerocrat8134
    @ibindo-weinnovatebuerocrat8134 2 года назад +1

    Throwing an Error now because of Line 16 - set origin. Hopefully somebody can fix this bug anytime. Thanks!

    • @Mattymew
      @Mattymew Год назад

      Did you ever find a fix?

  • @GauravAgarwal-zr4ck
    @GauravAgarwal-zr4ck Год назад

    I am getting error : cannot read properties of the undefined (Reading Legs) ( line 20)

  • @omerakkaya3064
    @omerakkaya3064 4 года назад

    Thank you.

  • @OuterSpaceandStars
    @OuterSpaceandStars Год назад

    Hello,
    Can we have an updated versions since I've got an error " Service invoked too many time for one day "
    i am using this method on a sheet contain 24k rows

  • @dailyComedyClips403
    @dailyComedyClips403 Год назад

    Hi there. I copied the code into appsscript, but im trying to use the formular i cant see =Googlemaps appearing. Am i doing something wrong? Do i have to switch the language or something else?

  • @raseclc
    @raseclc Год назад

    Hello.
    In addition to Distance and Time I need to know whether or not the route has a Toll or Ferry.
    In this spreadsheet, how to create a function in the VBA module to put Y or N in column G for Tolls or Ferry?

  • @user-tb8bd6vv5z
    @user-tb8bd6vv5z Год назад

    thanks

  • @niranjan6725
    @niranjan6725 4 года назад +1

    Hi
    Big fan of yours, I used this script on my sheet and works fine, but I am encountering issues,
    My issue is that I get error saying script invoked too many times in a day, how do we avoid this.
    Pls reply ASAP, VERY URGENT SUPPORT MEEDED

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 года назад

      Other then having a paid G-Suite account not sure what else you can do.

  • @josephlittle757
    @josephlittle757 11 месяцев назад

    Is there a way to save that function to a blank cell so when the above cells have the approriate data entered it auto populates without inputting the data each time?

  • @hepsi4951
    @hepsi4951 2 года назад +1

    mapObj.setOrigin(start_address); I TRIED BROTHER BUT ITS SHOWING MISTAKE IN 16TH LINE WHAT SHOULD I DO NOW KINDLY HELP
    PLEASE

  • @craysmith
    @craysmith 2 года назад +1

    Hey, is there a way to select the longest route rather than the quickest?

    • @futuresaundz
      @futuresaundz Год назад

      I would really like to know too please have you been able to achive it?

  • @alanfilipiak5001
    @alanfilipiak5001 Год назад

    How to modify the script so that it recalculates the distance only once when changing the value of the start or finish place? Unfortunately, in the example above, it recalculates too often, which in the end blocks the script.

  • @Puszka666
    @Puszka666 2 года назад

    Thanks a lot! I was looking for something like that.
    Do you have any idea how to create an image in cell with the route map?
    I created a dynamic links, but how to create something like screenshot / in cell? Do you have any idea?

  • @david_sdiego
    @david_sdiego 2 года назад

    I found this to be a static calculation that does not take traffic conditions into account.

  • @mithranvm6510
    @mithranvm6510 2 года назад

    hi thanks for this, i've tried by entering pin code. its not working in sheets but working in maps

  • @bradsteinmann1764
    @bradsteinmann1764 Год назад

    Thanks!

    • @bradsteinmann1764
      @bradsteinmann1764 Год назад

      Well this script has been awesome for a long time. In the last month or so I am getting errors when using certain zip codes or different combinations of zip codes. Any Idea what I can do to resolve this?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Год назад +1

      Just for some zip codes? The rest work fine?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Год назад +1

      Usually when you get errors for this that's because you run out of your daily limit. But in that case it will stop working for all zipcodes, not just for some.

    • @bradsteinmann1764
      @bradsteinmann1764 Год назад

      @@ExcelGoogleSheets Yes only for some including my personal zip code no longer works 37334

    • @bradsteinmann1764
      @bradsteinmann1764 Год назад

      @@ExcelGoogleSheets SO it seems the issue is only when using zip codes. If I use the "city, state" I have no errors.

  • @rajbhundia129
    @rajbhundia129 6 месяцев назад

    Keep getting "Service invoked too many times for one day: route.
    How to resolve?

  • @giongbania5383
    @giongbania5383 3 года назад

    làm tốt lắm anh bạn, cảm ơn bạn nhiều

  • @clairemolitor7359
    @clairemolitor7359 5 лет назад +1

    Hi ! Are you sure that the function returns the current travelling time ? In there a delay ? does it apply the time it is in my time zone ?

    • @pmarceta
      @pmarceta 4 года назад

      Hi, I had the same problem! The script shows a 10 min quicker arrival then the actual arrival when I checked in Google Maps on my phone - does anyone have a solution to why that is?

  • @natalieposton7853
    @natalieposton7853 Год назад

    Hi there! I'm struggling with an error code. It says "Exception: Service invoked too many times for one day: premium route. (line 18)." and now the distances won't calculate. Can you share more how to address this?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Год назад

      You get limited number of requests per day with free service. You'll have to use paid service for a large number of requests.

  • @IsaacTannerDempsey
    @IsaacTannerDempsey 5 лет назад

    Can you do something similar with addresses For example to see how many mins it would take to drive from depot to site and back.

  • @liciabravo85
    @liciabravo85 4 года назад

    thank you so much for this video! I have a really large dataset however and will need to implement google maps api. is there any way you can make a video/ a function script that includes a spot for me to put the google maps api?

    • @casianreport3318
      @casianreport3318 4 года назад

      take in consideration that if you have large database of address, and if you do not have google account paied, Gsuite. This will not work probably with large data. they put a limit.

  • @restbony8835
    @restbony8835 2 года назад

    How to make these made functions work with arrayformula. It seems that it doesn't expand the formula throughout the selected cells or how to make it work with the code that have triggers on change and write distance value to cell. Please help. Thanks!

  • @001478
    @001478 5 лет назад +1

    is it possible draw route between diferentes locations in this sheet?

  • @user-ic8ii4mu8t
    @user-ic8ii4mu8t Год назад

    hi wanna ask how to set the departure time like 6pm, as for the date, can it set like =today, so it will automatically change the date, kinda urgent🤣🤣if can please do reply

  • @noahyoung4946
    @noahyoung4946 2 года назад

    My cell spits out loading regardless of what I change... Any suggestions?

  • @abdelazizamera7274
    @abdelazizamera7274 2 года назад

    Im not sure why but this is not working for me it keeps saying error even though it is a real address

  • @michellerosa4908
    @michellerosa4908 4 года назад

    AMAZING VIDEO ... ONE QUESTION, i WOULD LIKE TO ADD HOURS FROM STARTING ADDRESS TO ENDING ADDRESS TO A PROJECT BUT I AM RECEIVING THIS MESSAGE. PLEASE TELL ME HOW I CAN FIX THIS. THANK YOU IN ADVANCE Exception: Invalid argument: origin (line 189, file "Maps")

  • @mirnadelcid6231
    @mirnadelcid6231 2 года назад

    How do I add the api key to look for more than 1000 records

  • @eazyzizo
    @eazyzizo 3 года назад +1

    it's giving me an (Error: Wrong Unit Type) even with your address, can you help, please !!

  • @mikewurlitzer5217
    @mikewurlitzer5217 6 лет назад

    As in the previous video relating to this topic, I am still getting mostly this error: TypeError: Cannot read property "legs" from undefined. (line 20). {which is the proper line # in my code where "legs" is first referenced}
    However, 2 of the five addresses do give me the proper mileage but ALL 5 of their "minutes" give me the same error: TypeError: Cannot read property "legs" from undefined. (line 20).