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.

Turn on suggestions

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
- Concatenate combined with IF statements

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

Topic Labels:
Formulas

Solved

Jump to Solution

0
1830
5

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

Feb 28, 2020 11:14 PM

Hello, dear Airtable community.

I want to generate a unique payment ID, based on the sum, date, cashier, and the type of transaction.

Everything has been good by far, until I decided that I want to try using emojis. So, I assumed it should be a mix of CONCATENATE and IF, because I want the emoji to appear only in one field = meaning that IF it says ‘cash’ then show ‘ :money_with_wings: ’, IF it says ‘card’ then show ‘ :credit_card: ’

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

Mar 01, 2020 05:02 AM

Absolutely, it can be in the same formula. Just concatenate it. I prefer to use the `&`

operator to join things together because I find it easier to read than the `CONCATENATE`

function. You can even use multiple lines.

All three of the following will produce the same result:

```
CONCATENATE(FIRST_FORMULA_OR_FIELD, SECOND_FORMULA_OR_FIELD, THIRD_FORMULA_OR_FIELD)
```

```
FIRST_FORMULA_OR_FIELD & SECOND_FORMULA_OR_FIELD & THIRD_FORMULA_OR_FIELD
```

```
FIRST_FORMULA_OR_FIELD
&
SECOND_FORMULA_OR_FIELD
&
THIRD_FORMULA_OR_FIELD
```

Reply

5 Replies 5

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

Feb 28, 2020 11:45 PM

Can you post your current formula?

Are you using the `CONCATENATE`

formula or the `&`

operator?

Here is the `IF`

statement:

```
IF({Payment Type} = "Cash",
"💸",
IF({Payment Type} = "Card",
"💳"
)
)
```

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

Mar 01, 2020 04:26 AM

Thanks for your reply and the IF statement!

I’m using a CONCATENATE function.

A separate IF function works well to produce a separate field translating words to emojis, as shown on the screenshot. But is there a way I can include the IF statement to the main concatenate field, so that a helper field is not necessary?

Solved
See Solution in Thread

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

Mar 01, 2020 05:02 AM

Absolutely, it can be in the same formula. Just concatenate it. I prefer to use the `&`

operator to join things together because I find it easier to read than the `CONCATENATE`

function. You can even use multiple lines.

All three of the following will produce the same result:

```
CONCATENATE(FIRST_FORMULA_OR_FIELD, SECOND_FORMULA_OR_FIELD, THIRD_FORMULA_OR_FIELD)
```

```
FIRST_FORMULA_OR_FIELD & SECOND_FORMULA_OR_FIELD & THIRD_FORMULA_OR_FIELD
```

```
FIRST_FORMULA_OR_FIELD
&
SECOND_FORMULA_OR_FIELD
&
THIRD_FORMULA_OR_FIELD
```

Reply

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

Mar 01, 2020 05:04 PM

Thanks, that worked! The & operator is indeed more friendly.

My current forfmula looks as follows:

{date field} & IF({Type} = “Cash”,“ :money_with_wings: ”,IF({Type} = “Card”,“ :credit_card: ”)) &{Cashier} & {amount}

I know, that is a whole different question, but can I add the “+” sign to differentiate between negative and positive values in the Primary field? Below is the screenshot where I want the values to be more aligned - with the minus sign in place for the expenses, I want to add the plus sign as well for better aesthetics so to speak :slightly_smiling_face:

:pray:

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

Mar 01, 2020 05:19 PM

`IF({amount} > 0, "+")`