Skip to main content
Solved

Convert Currency (dollars & cents) to plain text so shows cents .00

  • February 25, 2020
  • 7 replies
  • 56 views

Forum|alt.badge.img+14
  • Inspiring
  • 63 replies

Hi,

How do I get currency (ie. $22.00) to display the cents “.00” when exporting? I have an integromat automation that links Airtable to email and when I use mapping for my dollar amount it only shows the whole number (ie. $22.00 shows 22 – $22.50 shows 22.5).

Thanks!

Best answer by kuovonne

I figured it out finally.

For those who need in future:

IF(NOT(FIND(’.’,{REFERENCED NUMBER}&’’)),{REFERENCED NUMBER}&’.00’,
IF(FIND(’.’,RIGHT({REFERENCED NUMBER}&’’,2)),{REFERENCED NUMBER}&""&‘0’,{REFERENCED NUMBER}&""))


For future reference, @W_Vann_Hall has demonstration base for formatting numbers as currency to deal with these types of issues.

7 replies

Forum|alt.badge.img+14
  • Author
  • Inspiring
  • 63 replies
  • February 25, 2020

I know this is probably easy, but I just can’t figure it out. I have been searching and searching, but no luck :frowning: Any help would be greatly appreciated. I just need my dollars to show cents (ie. “.00” in plain text even when the last numbers are zero. Thank you.


Forum|alt.badge.img+14
  • Author
  • Inspiring
  • 63 replies
  • February 25, 2020

I know this is probably easy, but I just can’t figure it out. I have been searching and searching, but no luck :frowning: Any help would be greatly appreciated. I just need my dollars to show cents (ie. “.00” in plain text even when the last numbers are zero. Thank you.


I figured it out finally.

For those who need in future:

IF(NOT(FIND(’.’,{REFERENCED NUMBER}&’’)),{REFERENCED NUMBER}&’.00’,
IF(FIND(’.’,RIGHT({REFERENCED NUMBER}&’’,2)),{REFERENCED NUMBER}&""&‘0’,{REFERENCED NUMBER}&""))


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • 6009 replies
  • Answer
  • February 25, 2020

I figured it out finally.

For those who need in future:

IF(NOT(FIND(’.’,{REFERENCED NUMBER}&’’)),{REFERENCED NUMBER}&’.00’,
IF(FIND(’.’,RIGHT({REFERENCED NUMBER}&’’,2)),{REFERENCED NUMBER}&""&‘0’,{REFERENCED NUMBER}&""))


For future reference, @W_Vann_Hall has demonstration base for formatting numbers as currency to deal with these types of issues.


Forum|alt.badge.img+14
  • Author
  • Inspiring
  • 63 replies
  • February 25, 2020

For future reference, @W_Vann_Hall has demonstration base for formatting numbers as currency to deal with these types of issues.


Thank you. I used formula in his base instead :slightly_smiling_face:


Forum|alt.badge.img+3
  • New Participant
  • 2 replies
  • December 7, 2022

I figured it out finally.

For those who need in future:

IF(NOT(FIND(’.’,{REFERENCED NUMBER}&’’)),{REFERENCED NUMBER}&’.00’,
IF(FIND(’.’,RIGHT({REFERENCED NUMBER}&’’,2)),{REFERENCED NUMBER}&""&‘0’,{REFERENCED NUMBER}&""))


Nice! 

I was looking for this for ages and couldn't find it anywhere. I wanted a slight variation where "If the cents = .00, truncate it, else, leave the cents in. 

e.g. $32.00 --> $32 | $32.10 --> $32.10

For anyone wanting this solution in the future, here's the slightly adjusted code snippet:

IF(NOT(FIND('.',{COLUMN_NAME}&"")),{COLUMN_NAME}&'', IF(FIND('.',RIGHT({COLUMN_NAME}&"",2)),{COLUMN_NAME}&""&'0',{COLUMN_NAME}&""))

 

 

Cheers 😎


ScottWorld
Forum|alt.badge.img+35
  • Genius
  • 9808 replies
  • August 16, 2023

Also, if you use Make (formerly known as Integromat) for your automations — as the original author above said that he was using — you can use Make’s formatNumber function to format the numbers correctly.


Forum|alt.badge.img+8
  • Known Participant
  • 18 replies
  • September 26, 2023

@Frazer_McLeodRegular expressions are simpler, e.g.:

REGEX_REPLACE({Amount pretty}, '\.00$', '')