Cell State Dialog

The Cell State dialog allows you to enable or disable the execution of cells either explicitly or conditionally, based upon the value of a reference cell. Disabled cells will not be executed when the spreadsheet updates, so these cells retain their current values indefinitely, unless they are re-enabled.

Configure the State of One or More Cells

  1. Select a cell or a range of cells in the spreadsheet.
  2. On the Edit menu, click Cell State.

  3. Choose one of the following states for the selected cell(s):
    • Disabled: Selected cell(s) will not execute upon trigger.
    • Enabled: Selected cell(s) will execute upon trigger.
    • Conditionally Enabled: Selected cell(s) will be Enabled if the value of a reference cell is non-zero.
  4. If you chose Conditionally Enabled in the previous step:
    1. Choose either Relative or Absolute for the type of cell reference. For more information, see Cell References - Relative/Absolute.
    2. Click Select Cell to enter cell selection mode.

      Note: If a cell is referenced to itself, that reference is ignored.
    3. Choose a cell whose value will determine the state of the selected cell(s) from Step (1). Whenever Cell Reference evaluates to 0, the selected cell(s) will be Disabled; otherwise, they will be Enabled.
    4. Click OK.

Copy and Paste Cell States

If you copy and paste a cell whose state is Conditionally Enabled, the state of the pasted cell will depend on the type of reference that was chosen for the copied cell's Conditional Reference. Cell Reference will behave as either a relative or an absolute cell reference when the cell is copied and pasted to a new location. Cut and paste, however, will always leave Cell Reference identical to the cell that was cut.

The difference between relative and absolute conditional cell states arises when copying and pasting cell contents. If you copy a cell whose state is Conditional - Relative and paste it to a new location, the state of the pasted cell will be dependent upon the value of a cell relative to the location of Cell Reference for the copied cell.

On the other hand, copying a cell whose state is Conditional - Absolute and pasting it to a new location will always result in a pasted cell whose state is absolutely dependent upon the evaluation of Cell Reference for the copied cell, no matter where it is pasted.

Note: Using Cut and Paste (instead of Copy and Paste) simply moves the cell contents; no translation of relative cell references is performed.

Example 1: Relative Conditional Cell State Example

Assume a spreadsheet is configured as follows:

A0 = AcquireImage(...)

A2 = 'Enabled

A3 = 1.000

B2 = 'Disabled

B3 = 0.000

D2 = 'Copied

D3 = 37.000

E4 = 'Pasted

  1. Right-click cell D3 and select Cell State.
  2. Click Conditionally Enabled.
  3. Under 'Conditional Reference', click Relative.
  4. Click Select Cell.
  5. Double-click cell A3.
  6. Click OK.
  7. Right-click cell D3 and select Copy.
  8. Select cell E3.
  9. On the Edit menu, click Paste.

    The value 37.000 is pasted to cell E3. Note that E3 is Disabled (dimmed), although the copied cell, D3, was Enabled. Since the cell state for D3 was relatively conditional on the value of A3, the state of our pasted version, E3, is now conditionally based upon the value of B3 since we "moved" one cell to the right; the Relative cell state reference translates the same distance (both horizontally and vertically) as the cell contents. Cell E3 is disabled because B3 contains the value 0.000.

    When cell E3 is selected, the relative cell state reference (if B3) can be visually identified on the Job Edit toolbar as follows:

    In words, E3 will equal 37 if B3 contains a non-zero value.

Example 2: Absolute Conditional Cell State Example

Expanding upon the previous illustration, we can add a few more cells to our spreadsheet:

A4 = 1.000

B4 = 0.000

D4 = 442.000

  1. Right-click cell D4 and select Cell State.
  2. Click Conditionally Enabled.
  3. Under 'Conditional Reference', select Absolute.
  4. Click Select Cell.
  5. Double-click cell A4.
  6. Click OK to close the Edit Cell State dialog.
  7. Right-click cell D4 and select Copy.
  8. Right-click cell E4 and select Paste.

    The value 442.000 is pasted to cell E4. Note that E4 is Enabled because the cell state of the copied cell, D4, was absolutely conditional on the value of A4; the Absolute conditional cell state reference does not translate when cells are pasted to new locations.

    When cell E4 is selected, the relative cell state reference (if $A$4) can be visually identified on the Job Edit toolbar as follows:

    In other words, E4 will equal 442 if A4 contains a non-zero value.