Hi I have a price field that I auto import prices from and it comes out as “7 99” because that’s how this specific website shows the price. I want to use the find and replace script to replace the spaces " " with a period “.” however that doesn’t work. Idk code but should this fix be done in my data scraping or can airtable fix it.
Page 1 / 1
This can be done with a formula:
SUBSTITUTE({Price Field}, " ", ".")
If you want to turn that into an actual decimal number, wrap that in the VALUE()
function:
VALUE(SUBSTITUTE({Price Field}, " ", "."))
Be sure to set the field formatting to display decimal values.
Because you mentioned scraping…
Here is another Formula that might come in handy:
REGEX_REPLACE(TRIM({example of scraped text}), '\\s','.')
So this does two important things:
- It trims or removes the whitespace that might be dragged along from the scraping process (very common in my experience)
- uses the
\s
regex:
\s
matches any whitespace character (equivalent to o\r
\n
\t
\f
\v
])
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.