Help

Help with Formula Syntax Please (Newbie)

Topic Labels: Formulas
Solved
Jump to Solution
2338 5
cancel
Showing results for 
Search instead for 
Did you mean: 
Tom_David
6 - Interface Innovator
6 - Interface Innovator

Field 1: is a currency field
Field 2: a checkbox
Field 3: is a currency field

I need a Formula in field 3 to do this: IF field 2 = 1, copy & paste the value in field 1 to field 3.

Thank you.

1 Solution

Accepted Solutions
Ron_Daniel
8 - Airtable Astronomer
8 - Airtable Astronomer

@Tom_David , I believe this is what you're trying to do:
Screen Shot 2023-02-07 at 2.40.43 PM.png

In this example, the formula for Field 3 is just

IF({Field 2}=1, {Field 1})
and you'll need to make sure that the "Formatting" tab in the Field 3 formula is set to Currency.

See Solution in Thread

5 Replies 5

 

IF(
    AND({Field 1}, {Field 2}),
    IF(
        {Field 1} = {Field 2},
        {Field 1}
    )
)

 

There's a bit of nuance I want to call out to you.
A formula won't copy and paste a value. It will simply compute and display (return) the value that it computes.
Field 3 will return a currency formatted number, but it is a formula field.

Additionally, you'll want to be sure that in the field settings for your formula field are set to display the result in a currency format.
If you don't complete this step, then you will simply be returned a number.

Take this snippet for example:

IF(
    AND(5.24, 5.24),
    IF(
        5.24 = 5.24,
        5.24
    )
)

If you were to feed the formula field this snippet without specifying the formatting, it would return you with the default formatting of an integer, thus leaving you with just 5.

Refer to the screenshot below for steps on properly setting the formatting:

Ben_Young1_0-1675795152279.png

 

Thank you... not working. Here's what I wrote in the formula: 

IF(AND({Cleaning Fee}, {2021 Cleaned}), IF({Cleaning Fee} = {2021 Cleaned}, {Cleaning Fee}))
 
Do you see my error? 
 
Field 1=Cleaning Fee (Currency)
Field 2=2021 Cleaned (Checkbox)
Field 3=Cleaning Charge (Formula, formatted to Currency)
 

Curious.
Any additional details about your fields we might be overlooking? I wasn't able to replicate any issues when tested:

Ben_Young1_0-1675798548939.png

I also realized that part of my formula was redundant, but they're functionally the same.

IF(
  AND(
    {Cleaning Fee},
    {2021 Cleaned}
  ),
  {Cleaning Fee}
)

 

Ron_Daniel
8 - Airtable Astronomer
8 - Airtable Astronomer

@Tom_David , I believe this is what you're trying to do:
Screen Shot 2023-02-07 at 2.40.43 PM.png

In this example, the formula for Field 3 is just

IF({Field 2}=1, {Field 1})
and you'll need to make sure that the "Formatting" tab in the Field 3 formula is set to Currency.

Yes, that worked... and it looked a lot more like a spreadsheet formula (which is where I have spend most of my time). Thanks.