Skip to main content
Best answer

How to extract 10 right most values of a numeric string in Google Sheets


Hi,

I want to format a number and get only the 10 first digits starting from the right (it would be similar to what you can do with the Formula “RIGHT” in Excel or Google Sheet.

Basically i got this number: 12345678999 and I want to get: 2345678999

It’s important to remark that the original number (12345678999) could have different len (20 digits, 15, digits, 10...)

I’ve tried with the spreadsheet style formula zap but it doesn’t work. 

 

Thanks for your help!

Best answer by GetUWired

Hi @Fer 
This could easily be accomplished with a code step. Use Code by Zapier then run javascript. 

let number = inputData.number.slice(-10);

return {number}

 

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

GetUWired
Forum|alt.badge.img+12
  • Zapier Expert
  • 1030 replies
  • Answer
  • May 14, 2021

Hi @Fer 
This could easily be accomplished with a code step. Use Code by Zapier then run javascript. 

let number = inputData.number.slice(-10);

return {number}

 


william
Forum|alt.badge.img+6
  • Zapier Staff
  • 177 replies
  • July 7, 2021

Hey @Fer, hope you’re doing well, I just wanted to check in here!

Were you able to get things working with the information shared by GetUWired?