Trimming parameters out of a URL string

I have a field that captures the URL for a webpage, but some URLs contain extra parameters after the .html part of the string.

How can I remove anything after the .html for those records but not have a blank cell if the URL does not contain parameters after .html?

I’d like a formula so that new field displays the URLs, just trimming the ?utm… part where needed:

I figured out the trimming part using this formula, but not how to display URLs where there is no ?

LEFT({URL}, FIND("?", {URL}) -1)


How about checking for the presence of the ? before providing a return value:

  FIND("?", {URL}),
  LEFT({URL}, FIND("?", {URL}) -1),
1 Like

Amazing. Thank you so much!

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