Skip to main content
Solved

#ERROR using SUBSTITUTE()

  • September 27, 2024
  • 1 reply
  • 18 views

Forum|alt.badge.img+3

Hello! I want to generate some HTML code using a Lookup function and I've been running into a weird issue. Each HTML button is defined in a table, then is combined like such in a Lookup function:

<a href="/water-coaster/192/" style="text-decoration: none;" title="Go to this water coaster"> <span style="background-color: beige; color: black; padding: 10px 20px; border-radius: 50px; font-size: 16px; font-weight: bold;">Montanha Russa AquƔtica - Thermas dos Laranjais</span></a> , <a href="/water-coaster/281/" style="text-decoration: none;" title="Go to this water coaster"> <span style="background-color: beige; color: black; padding: 10px 20px; border-radius: 50px; font-size: 16px; font-weight: bold;">Acqua Coaster - Thermas Acqualinda</span></a>

Unfortunately, there is a pesky comma that Airtable adds in between the two blocks. I tried using a second column with the formula 

 
SUBSTITUTE(WaterCoastersManufacturerHTML,",","")
 
This always gives me a #ERROR as an output, no matter what characters I have in the substitute. Note that for some other entries, there are over 50 HTML buttons for one entry. Is this some sort of weird bug, an overflow issue, or did I mess something up? Thanks!

Best answer by egrubis

https://community.airtable.com/t5/formulas/error-on-very-simple-substitute/m-p/123568#M13964
This took care of it for me! Gotta convert "array" to "string". Classic

1 reply

Forum|alt.badge.img+3
  • Author
  • New Participant
  • Answer
  • September 27, 2024

https://community.airtable.com/t5/formulas/error-on-very-simple-substitute/m-p/123568#M13964
This took care of it for me! Gotta convert "array" to "string". Classic