Removing HTML code in the beginning of text

Hey Guys!
Im trying to remove a text in the beginning from a lookup field, by formula.
The text starts with "<div class="vaning"></div><div class="namn">" and I want to remove “<div class="vaning"></div>” in the beginning.
I tried with the replace formula but only get error messages, does anyone know why?
For example:
REPLACE({field name}, 1, 26, “”)
Thanks J

Your formula works fine for me, although check you are not inserting formatted quotes (just use plain text quotes).

REPLACE(Name, 1, 26, '')

Hi Jonathan
It works on an ordinary textfield as you mentioned, but not on a Lookup field and I don’t know how to get around that?

Ah, OK, this ie because the lookup field is an array not a string. What you need to do is turn the lookup field into a string, then it will work fine. So:

REPLACE(Lookup & '', 1, 26, '')

Joining the Lookup field with an empty string will convert the array to a string, then REPLACE can do its work.

1 Like

Yes that works great, just found that if I do a Rollup field instead, the original formula works as well.
Thank you for your advice.

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.