Help

How to remove quotes in IF formula

Topic Labels: Formulas
Solved
Jump to Solution
893 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Dgmknzgrl
6 - Interface Innovator
6 - Interface Innovator

Hi all,

I have read up that Airtable inserts double quotes if there are commas in the contents of the array, and I have seen reference to removing them by using either Substitute or Regex_Replace, but I have an IF statement and no idea how/where to put either to make it work (I'm new to formulas and they are def not my strong suit!)

This is my formula:

 

 
IF({Inspection}=BLANK(),{Art}&" ("&{Condition}&")", {Art}&" ("&{Condition}&" "&DATETIME_FORMAT({Inspection},'YYYY-MM-DD')&")")
 
Which gets me:
 
"A11.05/003a Joanna Staniszkis (Artist), Marta W. Suchy (Artist); Summer Kites" (Damage Inspection 2023-07-26)
 
If anyone could help, I'd appreciate it much. TIA!
 
1 Solution

Accepted Solutions
Alexey_Gusev
13 - Mars
13 - Mars

Hi,
You can forget BLANK() in Airtable and use just IF(InspectionArt&....rest_of_your_formula
You can omit brackets for one-word field names, but some users prefer to use them for all, to mark fields.
If you want to get your output without quotes, wrap your formula into substitute ( " to nothing):

SUBSTITUTE(
IF({Inspection},{Art}&" ("&{Condition}&")", {Art}&" ("&{Condition}&" "&DATETIME_FORMAT({Inspection},'YYYY-MM-DD')&")")
'"','')

 

See Solution in Thread

2 Replies 2
Alexey_Gusev
13 - Mars
13 - Mars

Hi,
You can forget BLANK() in Airtable and use just IF(InspectionArt&....rest_of_your_formula
You can omit brackets for one-word field names, but some users prefer to use them for all, to mark fields.
If you want to get your output without quotes, wrap your formula into substitute ( " to nothing):

SUBSTITUTE(
IF({Inspection},{Art}&" ("&{Condition}&")", {Art}&" ("&{Condition}&" "&DATETIME_FORMAT({Inspection},'YYYY-MM-DD')&")")
'"','')

 

Thanks much Alexey!

There was a comma missing from the end, but I figured it out (in red).

And now I can use the same formula to fix some other errors I've come across (extra spaces in things), so I'm very grateful, thanks again!

SUBSTITUTE(

IF({Inspection},{Art}&" ("&{Condition}&")", {Art}&" ("&{Condition}&" "&DATETIME_FORMAT({Inspection},'YYYY-MM-DD')&")") , '"','')