# Concatenate Problem

Topic Labels: Formulas
Solved
3533 12
cancel
Showing results for
Did you mean:
8 - Airtable Astronomer

Hi everyone! I hope you had an amazing Thanksgiving!

I have some problems with my formula, I'm trying to concatenate two columns (see attachment ). As you can see, the Calculation column missed the "commas" of the originals columns, and moreover, if there is anything in a column, it adds a comma.

I would like that my calculation is :

 1 Report Name 2- Report Name Calculation D, E C, F D, E, C, F F, C F, C D, E D, E

my formula is in the attachment.

What am I doing wrong?

Thank you very much!

1 Solution

Accepted Solutions
18 - Pluto

Hi Sara! Thank you very much for creating the base for me!

I added kuovonne's original solution about the `ARRAYJOIN()` to the formula and I think it should be what you're looking for

```

IF(
AND(
ARRAYJOIN({1- Report Name}),
ARRAYJOIN({2- Report Name})
),
ARRAYJOIN({1- Report Name}) & "," & ARRAYJOIN({2- Report Name}),
IF(
ARRAYJOIN({1- Report Name}),
ARRAYJOIN({1- Report Name}),
ARRAYJOIN({2- Report Name})
)
)
```
12 Replies 12
18 - Pluto

Your first two columns are lookup fields. That means that the commas you see in the lookup fields themselves aren't really there. Lookup fields are the most problematic fields to use in formulas. Try turning your lookup fields into rollup fields with the formula

`ARRAYJOIN(values, ", ") `
8 - Airtable Astronomer

Do you know how I can solve the problem of the blank cell? I would like that airtable won't add a comma when there is a blank cell.

18 - Pluto

Hi Sara, try this:
```
IF(
{1- Report Name}
{1- Report Name) & ", " & {2- Report Name}
{2- Report Name}
)
```

8 - Airtable Astronomer

Hi Adam, thank you for your help! do you mean with the CONCATENATE function?

8 - Airtable Astronomer

18 - Pluto

Hi Sara! So sorry, that is nowhere near the correct formula that I was supposed to give you. I was getting some errors trying to reply with the formula and must have somehow messed up sigh. I still can't do so now, but you can duplicate this base I've set up for you and grab the formula from there

8 - Airtable Astronomer

Thank you! I really appreciated that you had the time to create a base for me. Your formula works if the column "Report names" is just a text. I tried to use your formula on rollup and on lookup (Unluckily my reports are in one of those formats) and it "eats" the comma between some letters.

I attached the screenshot

Did I do something wrong? 🤔

18 - Pluto

Hmm, I think the way I've got my base set up might be slightly different? The formula seems to work fine with lookup fields

8 - Airtable Astronomer

Did I miss something in the formula? or did I wrong typing something?😨