title: How do I validate a cell using a range from a ListObject in Excel?
body: <p>I'm trying to validate a cell (<em>List</em> type validation) using values in a row that is in ListObject.  When I use a <em>named range</em> in my validation code, it works; but if I replace the <em>named range</em> reference to a <em>ListObject</em> reference it throws an error.  </p>
  
  <p>Can you use a ListObject to validate a cell?</p>
  
  <p>This is what I am doing that works using a <em>named range</em>:</p>
  
  <pre><code>With Range("Table1[COL1]").Validation
      .Delete
      .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, _
      Formula1:="=DEPT_NAMES" ' where DEPT_NAMES is a manually created named range
      '[...] more stuff goes here
  End With
  </code></pre>
  
  <p>But if I replace the value of <code>Formula1:=</code> and have it point to a valid list object like this:</p>
  
  <pre><code>Formula1:="=Table2[COL2]"
  </code></pre>
  
  <p>... I get an error.  I've also tried doing this through the UI and it doesn't work.</p>
  
  <p>Can you really not validate a cell using a ListObject?</p>