Jun 01, 2022 03:39 PM
Here is my example address:
https://www.google. com/maps/place/42+Nayland+Street,+Sumner,+Christchurch+8081,+New+Zealand/@-43.570045,172.7595125,17z/data=!3m1!4b1!4m5!3m4!1s0x6d32282318638d65:0xdbd8ceb7acf3afba!8m2!3d-43.570045!4d172.7595125
What I need to extract from over 350 records is this:
@-43.570045,172.7595125,
I was thinking i could take out everything before and after this showing up in the address but all longitudes and latitudes are different so I thought I could say maybe (?) I want to keep everything between the @ and the second comma.
thanks in advance!!!
Solved! Go to Solution.
Jun 02, 2022 11:49 AM
Rather than doing that, forget the other formulas and just use REGEX to get the Latitude and Longitude directly.
REGEX_REPLACE({Field Name}, "(.*)@([^,]*),([^,]*)(.*)", "$2")
and
REGEX_REPLACE({Field Name}, "(.*)@([^,]*),([^,]*)(.*)", "$3")
respectively.
Jun 01, 2022 08:46 PM
Hi Cheryl, assuming the formatting’s always the same, you could try this:
MID(
{Field Name},
FIND('@', {Field Name}),
FIND(',', {Field Name},
FIND(',', {Field Name},
FIND('@', {Field Name})
) + 1
)
-
FIND('@', {Field Name})
)
Jun 02, 2022 07:07 AM
Hey Adam-thank you so much for answering this. I’m not sure what field names I am supposed to be inserting though… all I have is a list of google addresses I need the break the longitude and latitude out of each one. Help?
Jun 02, 2022 10:13 AM
Its all the same field. Whatever you named the field that has the URL, enter that wherever Adam said “Field Name”
Jun 02, 2022 10:29 AM
OMG ya’ll are amazing!!! thank you so much!!! it worked!!!
Jun 02, 2022 10:49 AM
Now I have a field that has (example longitude and latitude) @51.1529157,-0.4393229
I have fields set up for the examples above. how do I choose the “@ through comma” and pull that to the latitude field and everything past the comma to the longitude field so i can have it populate my map. Let me know if this is not clear. so the fields would now hold "@51.1529157, and -0.4393229 then I know how to run a substitution to take out my @ and comma
Jun 02, 2022 11:49 AM
Rather than doing that, forget the other formulas and just use REGEX to get the Latitude and Longitude directly.
REGEX_REPLACE({Field Name}, "(.*)@([^,]*),([^,]*)(.*)", "$2")
and
REGEX_REPLACE({Field Name}, "(.*)@([^,]*),([^,]*)(.*)", "$3")
respectively.
Jun 02, 2022 02:24 PM
You are soooo Awesome! thank you so much this really worked…
Jun 02, 2022 02:29 PM
Great! Can you mark the actual formula as the solution? It makes it easier in the future for people to search for the answer to similar questions.
Jun 02, 2022 02:41 PM
ohhhh was thinking I did…. yes i changed it to the formula!! thank you again!