title: VBA How to Check if Cell Value is valid and exists?
body: <p>I have this <code>cell.Offset(0, -2)</code> cell that I need to check if it exists inside my VBA loop. </p>
  
  <p>My idea is that if the <code>cell</code> has an <code>.Offset(0, -2)</code> that does not exist (e.g. say <code>cell</code> = Column B and <code>cell.Offset(0, -2)</code> = Column A-1, <code>cell.Offset(0, -2)</code> is supposed to be invalid), I want to be able to check that it doesn't exist in the if else statement.</p>
  
  <p>Right now when it doesn't exist, I'm getting a <code>“Runtime Error 1004: Application defined or object defined error”</code>.</p>
  
  <p>I've tried <code>IsErr(cell.Offset(0, -2))</code>, <code>cell.Offset(0, -2).Value</code>, <code>If cell.Offset(0, -2) Is Nothing Then</code>, <code>cell.Offset(0, -2) = ""</code>, but none of them seem to work... can anyone point me in the right direction? I'm pretty new to VBA and it seems like different variable types have different ways of checking if the value exists.</p>