title: Conditional Swap of cells contents in Excel
body: <p>I was wondering, given 3 columns in an excel file, how to  conditionally swap the content of the first 2 columns given the values of the third one.</p>
  
  <p>A    B     C</p>
  
  <p><br/>
  a  1   y
  <br/>
  b  2   n
  <br/>
  c  3   y
  <br/>
  d  4  y
  <br/>
  e 5  n</p>
  
  <p>What I want to do is: whenever there is a row containing the value "y" in the C columns, I want to swap the values in the columns A and B of the same row.</p>
  
  <p>Is there no other way than a VBA?</p>
  
  <p>Hope  the problem is clear.</p>
  
  <p>Thanks</p>