Skip to main content
Solved

not include () if blank

  • February 2, 2024
  • 2 replies
  • 30 views

Forum|alt.badge.img+5

Hello!

I'm trying to create a formula that will create First Name (Goes By Name) Last Name (Business Name).  I've gotten my formula so that I can get all those pieces together, however if either Goes By or Business Name exists and the other doesn't, I'm getting () included still. 

For example

Katelyn () Grant (Airtable) or Katelyn (Kate) Grant () 

How do I get it to not include the () if the field is empty?

Here's the formula:

 
IF(
OR({Goes By Name}, {Business Name}),
{First Name} & " " & "(" & {Goes By Name} & ")" & " " & {Last Name} & " " & "(" & {Business Name} & ")",
{First Name} & " " & {Last Name})

 

Best answer by TheTimeSavingCo

Hm, I think I'd set up my formula to be like so instead:

{First Name} & " " & IF( {Goes by Name}, "(" & {Goes by Name} & ") " ) & {Last Name} & IF( {Business Name}, " (" & {Business Name} & ")" )

Resulting in:

2 replies

TheTimeSavingCo
Forum|alt.badge.img+31

Hm, I think I'd set up my formula to be like so instead:

{First Name} & " " & IF( {Goes by Name}, "(" & {Goes by Name} & ") " ) & {Last Name} & IF( {Business Name}, " (" & {Business Name} & ")" )

Resulting in:


Forum|alt.badge.img+5
  • Author
  • New Participant
  • February 7, 2024

This worked, thank you so much!