2

How do I go about using REGEXREPLACE to insert commas into values in Google Sheets? Example:

cell A1 = 1234567890

expected output in B1 = 1,234,567,890

edit: The intention would be so that the user would not need to format anything themselves. This issue is from a template I'm doing up, sample sheet here - https://docs.google.com/spreadsheets/d/1n-KXqcSpx_DpvrOv9A4UsKn1amGGEUCpyzWWDphWdJY/edit?usp=sharing

3 Answers 3

1

try:

=TEXT(A1; "#,###,###,##0")
Sign up to request clarification or add additional context in comments.

5 Comments

Thanks man! Glad to know this was possible without REGEXREPLACE.
Any idea on how to incorporate this TEXT() with QUERY()?
I can't seem to be able to incorporate it in. Sorry for the trouble. Perhaps you can give it try with this sample sheet - docs.google.com/spreadsheets/d/…
@qazamy proper syntax would be: i.sstatic.net/QGhfU.png however query is known to be buggy when it comes to mixing text values with numeric values like in your case so try: i.sstatic.net/7qqUg.png
0

Try

=A1

and change the format to

#,##0

1 Comment

This wouldn't be an option as the intention would be so that the user would not need to format anything themselves. This issue is from a template I'm doing up, sample sheet here - docs.google.com/spreadsheets/d/…
0

To insert commas into values in Google Sheets, I recommend:

  • Select the range of cells you'd like to format or modify.
  • Click Format and then Number.
  • Select the format to apply to the range of cells.

1 Comment

This wouldn't be an option as the intention would be so that the user would not need to format anything themselves. This issue is from a template I'm doing up, sample sheet here - docs.google.com/spreadsheets/d/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.