Skip to main content

IF formula for formatting numbers in a concat

  • November 18, 2021
  • 2 replies
  • 43 views

Forum|alt.badge.img+3

Hi AirTable Community,

I am trying to create an IF formula to format a number field to an abbreviated format depending on if it is 100,000 or 1,000,000… eg.

“780000” becomes “780k”
“1000000” becomes “1M”

Purpose is because I am trying to Concat the abbreviated number together with other fields.

Does anyone know how to write such a nested IF statement?

Thankyou in advance!!

2 replies

Forum|alt.badge.img+18
  • Inspiring
  • November 18, 2021

Hi Jazmin. Give this a try…

IF((loanAmount/1000000)>1, ROUND((loanAmount/1000000),1) & 'M',
     IF((loanAmount/1000)>1, ROUND((loanAmount/1000),1) & 'k',
         loanAmount & '')
)

You can change the ROUND parameter to 0 if you don’t ever want decimal places.


Forum|alt.badge.img+3
  • Author
  • Known Participant
  • December 1, 2021

Hi Jazmin. Give this a try…

IF((loanAmount/1000000)>1, ROUND((loanAmount/1000000),1) & 'M',
     IF((loanAmount/1000)>1, ROUND((loanAmount/1000),1) & 'k',
         loanAmount & '')
)

You can change the ROUND parameter to 0 if you don’t ever want decimal places.


Oh my gosh it works! :sob:

Thank you so much @augmented . Really appreciate it!