Skip to main content

Hey folks, I’m trying to figure something out.

I’ve got an old CSV doc that I’ve integrated. Unfortunately, it’s a mess and I’m only a “enough to get by” kind of Airtable coder. I’m a bit stumped.

So, I’m trying to make a formula that combines multiple cells to make a condensed long text field for mailing addresses (if possible). Unfortunately, many of these individual cells are empty and there are 562 lines of them. There’s no good rhyme or reason as to what is empty, either. Sometimes it’s address 1 and address 2, sometimes there’s a city and state and nothing else, sometimes all of the information is filled out, so making a straight hierarchal system like I’m more used to seeing doesn’t really work.

Example:
IF(address 1, <all the info>, 
  (IF(address 2, <address 2 down>,
    (IF(address 3, <address 3  down>,)))

Here’s my best effort at what I want to do:

Any advice? Thanks in advance!

That looks good to me, is there an edge case that’s causing it to fail?

---

Extremely minor quibble, but we can skip the , “” at the end if it’s blank for the first three lines like for the last 3 lines

IF({Address 1}, {Address 1} & '\n') &

IF({Address 2}, {Address 2} & '\n')
 

Which still works fine:

 


Hey ​@Chris_Moore,

Even if cliche, my best advice here is that you do some testing with your formula, share it with Chatgtp and explain some context, provide some examples, test the new formula, and repeat. You should get it going with only a couple of iterations (at most).

If this does not work for you, please let us know where you got stuck or where your formula is not working as expected!

Mike, Consultant @ Automatic Nation


<facepalm>


I’m pretty sure I was using “\n” instead of ‘\n’ and that’s what sent things sideways. After rewriting the code out, it’s working perfectly. 

Thank you for the review! I’m glad I was on the right path even if I made a silly mistake.


Lol, thanks for keeping us posted. Feel free to reach out as needed!

Mike, Consultant @ Automatic Nation