paste code to new script (google app script as .gs) then goto menu tools -> macro -> import -> TravelDistance, press import bottom so use function in cell C5=TravelDistance( origin_place, destination_place, your_google_API_key)