title: Selecting every Nth row, Excel. Replace with nothing or original cell content
body: <p>I've got an Excel sheet with my variables listed in column <code>E</code> and their values listed in column <code>G</code></p>
  
  <p>I would like to test if <code>E</code> contains the word <code>"text"</code> (my variable). If so then I want to replace the corresponding cell in column <code>G</code> with <code>"This is my successful if statement text"</code>.</p>
  
  <p>If not -- I want the cell to either be left alone (impossible in excel) or keep the value it originally had (I think the issue is its populated with text not numbers).</p>
  
  <p>So far ive tried</p>
  
  <pre><code>=if(e2="text", "Replace with this", G2)
  </code></pre>
  
  <p>as well as</p>
  
  <pre><code>=if(e2="text", "replace with this", "")
  </code></pre>
  
  <p>The top returns a number while the bottom returns an empty cell which deletes the contents I had there.</p>
  
  <p>Any suggestions? I think this can be done with VB but that's out of my league.</p>