title: Multiple condition find and Replace
body: <p>I am very new to this forum and to Excel VBA. I have learnt a little by playing with VBA for sometime. But now I am stuck in this little problem which I am sure the Excel Guru’s here would be in a position to help me. Any help on this would be really appreciated . Below is my Problem</p>
  
  <p><strong>Summary:</strong></p>
  
  <p>I have a spreadsheet with values in Columns <code>A:F</code>
  I want to find and replace values in Column <code>C</code> with Hex depending on the Value in Column <code>C</code> and Column <code>A</code>.</p>
  
  <p><strong>Example:</strong></p>
  
  <p>If Column <code>A = 1</code> and Column <code>C = General</code> then replace <code>General</code> with <code>0x0001</code></p>
  
  <p>But if Column <code>A = 2</code> and Column <code>C = General</code> then replace <code>General</code> with <code>0x0002</code></p>
  
  <p><strong>My code:</strong></p>
  
  <p><code>Columns("C").Replace What:=" General", Replacement:=" 0x0001", LookAt:=xlWhole, _SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ReplaceFormat:=False</code></p>
  
  <p><strong>Problem:</strong></p>
  
  <p>The code I currently have only looks at the values in Column <code>C</code> so changes every <code>General</code> to <code>0x0001</code>. </p>