Help

Re: #ERROR with SUBSTITUTE Formula

Solved
Jump to Solution
222 0
cancel
Showing results for 
Search instead for 
Did you mean: 
hunter86
4 - Data Explorer
4 - Data Explorer

I have two tables:

  1. Key Source Formula
  2. Sources

Within the Key Source Formula table I have a field called URL Format

An example entry is:   https://www.website.com/search/?q="Company"&t=week

In the Sources table I have a value called Company Name Text
e.g. Apple, which I want to substitute into the URL Format. This should return a result like:

https://www.website.com/search/?q=Apple&t=week

The SUBSTITUTE formula I have is:

SUBSTITUTE({URL Format}, "Company", {Company Name Text})

It returns #ERROR.

I have even used the Airtable AI to write this formula and it doesn't work.

Any help much appreciated

1 Solution

Accepted Solutions
hunter86
4 - Data Explorer
4 - Data Explorer

Solved by Copilot.

Sometimes, adding an empty string to the fields can help convert them to text. Try modifying your formula to:

SUBSTITUTE({URL Format} & "", "Company", {Company Name Text} & "")

See Solution in Thread

2 Replies 2
hunter86
4 - Data Explorer
4 - Data Explorer

Solved by Copilot.

Sometimes, adding an empty string to the fields can help convert them to text. Try modifying your formula to:

SUBSTITUTE({URL Format} & "", "Company", {Company Name Text} & "")
anavi
4 - Data Explorer
4 - Data Explorer

Thanks, I had the same problem and this solved it! Don't understand the logic, but it worked!