title: How to delete all cells that do not contain specific values (in VBA/Excel)
body: <p>I fully didn't understand how to follow the answer in <a href="https://stackoverflow.com/questions/19019304/vba-deleting-rows-that-do-not-contain-set-values-defined-in-range">vba deleting rows that do not contain set values defined in range</a> (I need to use VBA for this). From what I gathered, i need to specify an array, then use some if then stuff.</p>
  
  <p>In my case, I want to create something that will search just a specified column and delete all values that do not contain specific letters/numbers. 1,2,3,4,5,s,f,p,a,b,c,o are the numbers/letters i want to keep. Cells which do not contain these values (even 11 or 1s should be deleted), I want only to delete the cell (not the whole row) and shift the cells below it up (i believe you can do this with the default .delete command).</p>
  
  <p>For example my columns look like this:</p>
  
  <p>p<br>
  a<br>
  1<br>
  2<br>
  5<br>
  s<br>
  f<br>
  s<br>
  8</p>
  
  <p>31<br>
  4<br>
  f  </p>
  
  <p>I want to screen my data so that all blank cells and all cells which do not contain the numbers or letter mentioned above (e.g. 31 and 8 in this case) are automatically deleted. </p>
  
  <p>Thanks for your help! </p>