Extract X or Y depending on what is found in a separate field

I’m trying to put together a formula IF statement to extract certain parts of a URL depending on what is found in a specific cell for that record.

In plain language: IF {Published on/by} is “Website.com” pull 6 characters after “post=” in the {URL or Permalink}, OTHERWISE, IF {Published on/by} is “YouTube.com” pull 15 characters after “watch?v=” in the {URL or Permalink}, OTHERWISE say “no URL found”

I tried this but it doesn’t work:

IF({Published on/by}=“Website.com”),MID({URL or Permalink},FIND(“post=”,{Published on/by}), 6), IF({Published on/by}=“YouTube”),MID({URL or Permalink},FIND(“watch?v=”,{URL or Permalink}),15),“no URL found”)

HELP! Thanks!

IF({Published on/by}=“DBC/YouTube”),MID(FIND(“watch?v=”,{URL or Permalink}),15),“not known”)

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