title: Extracting digits from a cell with varying char length
body: <p>I have a group of cells, the first of the string never changes, it is and always will (until the coder changes it) <code>20</code> characters (inc spaces).</p>
  
  <p>I then want to extract the 3 numbers (and in some cases 2) from the remaining sequence.</p>
  
  <pre><code>The monthly cost is 2 silver, 1 copper and 40 iron.
  The monthly cost is 1 silver, 94 copper and 40 iron.
  The monthly cost is 1 silver and 75 copper.
  The monthly cost is 8 silver and 40 copper.
  The monthly cost is 1 silver.
  The monthly cost is 99 silver, 99 copper and 99 iron.
  The monthly cost is 1 gold.
  </code></pre>
  
  <p>In the sample above you can see that there is no set value after the first 20 chars.</p>
  
  <pre><code>1 or 99 silver 
  1 or 99 copper
  0, 1 or 99 iron  
  </code></pre>
  
  <p>I can't get a sequence that gets all the cells correct, I've tried the following:</p>
  
  <pre><code>=IF(J7&lt;&gt;1,(MID(TRIM(J7),FIND(" iron",TRIM(J7))-2,FIND(" iron",TRIM(J7))-FIND(" iron",TRIM(J7))+3)),"")    
  results in:  #VALUE!  (when no iron)  
  
  =TRIM(MID(J6,FIND(" silver",J6)-2,LEN(J6)-FIND(" silver",J6)-26))&amp;TRIM(MID(J6,FIND(" copper",J6)-2,LEN(J6)-FIND(" copper",J6)-16))&amp;TRIM(MID(J6,FIND(" iron",J6)-2,LEN(J6)-FIND(" iron",J6)-3))  
  results in:  1 s9440   
  
  =MID(J7,31,2-ISERR(MID(J7,21,1)+0))  
  results in:  nd
  </code></pre>
  
  <p>If I <code>&amp;</code> the cells as part of the calculation, they then don't calculate in the next mathematical step as I've had to allow for <code>spaces</code> in my code, in the case that there may be 2 digit numbers, not single.</p>
  
  <pre><code>=MID(J5,SEARCH(" silver",J5,1)-2,2)&amp;MID(J5,SEARCH(" copper",J5,1)-2,2)&amp;MID(J5,SEARCH(" iron",J5,1)-2,2)  
  results:   2 140
  not:       2140
  </code></pre>
  
  <p>What I need to end up with is:</p>
  
  <pre><code>2140  
  19440  
  175  
  840  
  1  
  999999   
  </code></pre>
  
  <p>Many thanks in advance. </p>