title: excel cell reference in javascript
body: <p>I have a combobox and a textbox in EXTJS 4. </p>
  
  <pre><code>else if (record.get("type") === "CELL_VALUE" &amp;&amp; record.get("apply_before") === true)
      {
          Ext.Msg.alert("Field Validation", "I am Validating the CELL VALUE COMBO VALUE"); //alert message for testing only, this is where validation will occur
      }
  </code></pre>
  
  <p>In this scenario, "type" is a standard combobox and "appy_before" is a checkbox. If type = Cell Value and apply_before is checked, I need to validate a text box (range_from) contains a valid excel cell location, and that a second text box (range_to) is empty and if validation passes, set isValid = true, else isValid = false.</p>
  
  <p>I know part of it should be as follows:</p>
  
  <pre><code>else if (record.get("type") === "CELL_VALUE" &amp;&amp; record.get("apply_before") === true)
      {
              if (rangeFrom != (A1 - XFD1048576)**problem here**) || (rangeTo != null)
                      isValid = false;
      }
  </code></pre>
  
  <p>can anyone please provide a little more direction please as I have no clue how to check for the valid cell location where the range of cells can be anything from </p>
  
  <pre><code>A1 (first possible valid cell) to XFD1048576 (the last possible valid cell)
  </code></pre>