Skip to content

Google sheets script to format numbers into a readable format, with suffixes of 'K', 'M' and 'B'

Notifications You must be signed in to change notification settings

rahulgoel97/numberformat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Number format

Google sheets script to format numbers into a readable format, with suffixes of 'K', 'M' and 'B'.


Table of Contents


Installation

  1. On your Google sheet, go to Tools -> Script Editor

  2. On the page, copy and paste the contents of FORMATNUMBER.js

  3. Name the script 'Format Number' (or whatever you desire...)

  4. Click on File -> Save & click on the play button

  5. Your script should be ready. Try and type '=NUMBERFORMAT(5000)' to test the installation


Examples

Number: 28349586 in Cell A1

By default, the function will determine if 'K', 'M' or 'B' is the correct suffix and round to zero decimals

Formula: =FORMATNUMBER(A1, 0)

Result: 28M

The number of decimals can be selected using the second token

Formula: =FORMATNUMBER(A1, 2)

Result: 28.35M

Finally, the default suffix can be overriden

Formula: =FORMATNUMBER(G17,0,"K")

Result: 28,350K

License

Use away, as your heart desires

About

Google sheets script to format numbers into a readable format, with suffixes of 'K', 'M' and 'B'

Resources

Stars

Watchers

Forks

Packages

No packages published