title: Excel VBA - Extract numeric value in string
body: <p>I have multiple tables of data in which, in one column, I have information about the value of various contracts. For each contract, the information contained in each cell of that column is presented as follows:</p>
  
  <p>"The value of the contract is $XX,XXX.XX."</p>
  
  <p>Sometimes, there will be additional text after the dollar value, as follows:</p>
  
  <p>"The value of the contract is $XX,XXX.XX. There is an option to modify the duration of the contract"</p>
  
  <p>I need to program a sub that allows me to extract the dollar value within that string of text and only keep that information (and none of the text coming before and after).</p>
  
  <p>The difficulty I'm facing here is that everything is subject to change. The dollar value is never the same and the text before or after it also changes.</p>
  
  <p>So far I've been able to successfully keep everything after the $ sign, using the SPLIT function and $ as delimiter. However, I keep having problems removing whatever text may follow the dollar value.</p>
  
  <p>Any idea on how I could proceed?</p>
  
  <p>Thank you for your help!</p>