title: Extract part of text from a URL in Excel
body: <p>I am working on extracting a part of the URL to another column. Here are 2 URLs - </p>
  
  <pre><code>http://learn.reg.edu/degree-programs/religion-theology/?bm_source=facebook&amp;bm_medium=ppc&amp;bm_campaign_id=6086055048219&amp;bm_adset_id=6086055734819&amp;bm_ad_id=6094109509819&amp;bm_placement=Facebook_Mobile_Feed   
  
  http://learn.regent.edu/home-2/?persist=1&amp;bm_placement=an&amp;bm_ad_id=%7B%7Bad.id%7D%7D&amp;bm_adset_id=%7B%7Badset.id%7D%7D&amp;bm_campaign_id=%7B%7Bcampaign.id%7D%7D&amp;bm_campaign=rm&amp;bm_medium=ppc&amp;bm_source=facebook
  </code></pre>
  
  <p>So I wish to pull out text after "bm_placement=" and whatever it says (like in the above two urls, url 1 has "Facebook_Mobile_Feed" and url 2 has "an")</p>
  
  <p>I am using this formula - </p>
  
  <pre><code>=RIGHT(ES16760,LEN(ES16760)-(FIND("bm_placement=",ES16760,1) +12))
  </code></pre>
  
  <p>It works fine for the first URL but for the second one, it pulls out everything after "an" which I do not want. Any suggestions on how to solve this?</p>
  
  <p>Thanks!</p>