2

So I have a list of Google+ profile links in a Google Sheet

https://plus.google.com/112337650380234682548/

How can I extract the number on the end in a seperate column?

I've tried =split(url,"/") but that ends up formatting the numerical id in scientific notation and will not display it as text no matter what I try. Additionally I don't want the rest, just the last element.

5

With a REGEXEXTRACT formula you can do the following.

Formula

A1 = https://plus.google.com/112337650380234682548/
=REGEXEXTRACT(A1, "\d+")

Explained

The REGEX (\d+) searches for numbers only; d == numbers and + == all instances.

Screenshot

enter image description here

Note

The REGEXEXTRACT formula returns a string. The SPLIT formula however returns a formatted value, in your case a number existing of 21 digits. Google Sheets can only handle numbers up to 15 digits. The rest of the digits are being set to zero and a scientific notation is chosen.

Example

I've created an example file for you: SPLIT vs. REGEXEXTRACT

| improve this answer | |
  • Cheers this works, Can you explain why it works as opposed to split? I was very confused and may help others later. – Ryan The Leach Sep 21 '14 at 6:46
  • 1
    @RyanTheLeach See my revised answer. – Jacob Jan Tuinstra Sep 21 '14 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.