title: Excel VBA If range.value = something then
body: <p>What I am looking for is this -</p>
  
  <p>If a value in range of cells equals to some value or same value then it should show "Positive" else "Negative. But when I write like below syntax, it throws an error -</p>
  
  <pre><code>If range("F3:H5").value = "X" then
  
  Msgbox "Positive result"
  
  else
  
  Msgbox "Negative result"
  
  end if
  </code></pre>