Skip to main content
Solved

Return either currency or blank value in formula field

  • April 27, 2020
  • 2 replies
  • 43 views

This is admittedly an aesthetic concern, but I feel like it should be possible.

I have a formula that tests a checkbox field, {Guild?}, to see if I owe fees for a given project to a guild I work with. If it is a guild project, then the formula should return a currency value equal to the amount received for the project, {Rec’d}, times the Cut field, which is a percentage.

Currently, I have it written like so:

IF({Guild?}=1, {Rec’d}*{Cut}, " ")

This returns the right numbers for guild projects and leaves non-guild projects blank. Fine and good. However, I cannot use the field formatting options because the values are not all numbers. Is there a way to tell Airtable to return {Rec’d}*{Cut} as currency?

Best answer by kuovonne

The value are not all numbers, because the “else” part of your IF statement returns a string that is a single space character. Remove that part from your formula, and you will have number formatting available.

IF({Guild?}=1, {Rec’d}*{Cut})

2 replies

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • Answer
  • April 27, 2020

The value are not all numbers, because the “else” part of your IF statement returns a string that is a single space character. Remove that part from your formula, and you will have number formatting available.

IF({Guild?}=1, {Rec’d}*{Cut})

  • Author
  • New Participant
  • April 28, 2020

The value are not all numbers, because the “else” part of your IF statement returns a string that is a single space character. Remove that part from your formula, and you will have number formatting available.

IF({Guild?}=1, {Rec’d}*{Cut})

Yeah, but that was, like, easy. I was trying to do it the hard way.

Thanks!