VBA Code to Complete/ validate address in excel using Google API key

Noni

Board Regular
Joined
Aug 27, 2022
Messages
63
Office Version
  1. 2021
Platform
  1. Windows
Hi, I've got my google API key and want to use it to complete broken/incomplete addresses using vba code.
addresses in column A sometimes come without suburb or postcode or State.
AddressCleansing.xlsm
ABCDEF
1Incomplete AddressesCleaned Required AddressesPost CodeStreet AddressesSuburbState
212 April Street WA 6980
315/80 Gale Ave Adelaide SA
46 Wool Cres Woy Woy 3456
5
Sheet1

desired result after running code:
AddressCleansing.xlsm
ABCDEFGHIJK
1Incomplete AddressesCleaned Required AddressesPost CodeStreet AddressesSuburbState
212 April Street WA 698012 April Street Perth WA698012 April StreetPerthWA
315/80 Gale Ave Adelaide SA15/80 Gale Ave Adelaide SA567815/80 Gale AveAdelaideSA
46 Wool Cres Woy Woy 34566 Wool Cres Woy Woy VIC34566 Wool Cres Woy Woy Woy WoyVIC
5
6
7
Sheet1

Appreciated!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,224,885
Messages
6,181,574
Members
453,055
Latest member
cope7895

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top