This website uses Cookies. Click Accept to agree to our website's cookie use as described in our Privacy Policy. Click Preferences to customize your cookie settings.

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Airtable Community
- Discussions
- Ask A Question
- Formulas
- Re: Formula using IF

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Solved

Jump to Solution

0
209
0

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Comment Post Options

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Jan 11, 2021 03:28 AM

i have the following colums that iam trying to combine in a formula :

- customer billing (with only two possibles choices: direct or indirect)
- indirect total sales revenue (a formula which multiplies a monthly amount by a number of months)

I need a formula in a new column which combines the two following conditions:

IF “indirect” is chosen, then copy the same amount

IF “direct” is chosen, then apply a 12% on the “indirect total sales revenue”

i hope it is clear enough.

Thyank you very much in advance!

Solved! Go to Solution.

1 Solution

Accepted Solutions

Solved
See Solution in Thread

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Jan 11, 2021 09:58 PM

Kuovonne,

You were 100% correct. No need to use the SWITCH instruction (even though I learnt something new!).

My IF formula works exactly as I needed it to.

Thank you again for your help, very instructive.

**François**

5 Replies 5

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Jan 11, 2021 08:41 AM

Welcome to the Airtable community!

The formula field reference has info on the functions to combine to do what you want.

```
IF( {customer billing) = "indirect",
{indirect total sales revenue},
{indirect total sales revenue} * 1.12,
)
```

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Jan 11, 2021 09:50 AM

thank you very much! it helps.

the first condition of the formula works.

I still need the second condition in the formula

should the formula continue with:

OR IF ( {customer billing = “direct”, {indirect total sales revenue}) ?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Jan 11, 2021 09:52 AM

thank you very much Kuovonne! it helps.

the first condition of the formula works.

I still need the second condition in the formula

should the formula continue with:

OR IF ( {customer billing = “direct”, {indirect total sales revenue}) ?

Thank you again!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Jan 11, 2021 10:30 AM

The second situation is handled in the last part of the `ÌF`

function, where the {indirect total sales revenue} is multiplied by 1.12. Since the {customer billing} field can only have two values, the function only needs to test if the {customer billing} is “indirect”. If {customer billing} is not “indirect”, then it must be “direct”, without having to explicitly test for it.

On the other hand, if you really want a different formula that explicitly lists all of the possible values for the {customer billing} field, you can use a switch function.

```
SWITCH({customer billing},
"indirect", {indirect total sales revenue},
"direct", {indirect total sales revenue} * 1.12
)
```

There are many different ways of doing things with formulas/code. Pick whatever makes the most sense to you.

If neither of these formulas work for you, please send a screen capture annotated with your desired results!

Solved
See Solution in Thread

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Jan 11, 2021 09:58 PM

Kuovonne,

You were 100% correct. No need to use the SWITCH instruction (even though I learnt something new!).

My IF formula works exactly as I needed it to.

Thank you again for your help, very instructive.

**François**