About Cell References

You can create interdependencies among formulas by means of ShapeSheet cell references. Cell references give you the power to calculate a value for one cell based on another cell's value. For example, a shape's Width cell might contain a formula that calculates the shape's width by referring to the value of its Height cell, so that when a user resizes the shape vertically, its width stays in proportion.

In a cell's formula, you can refer to a cell of the same shape or another object, such as a document or page, so that Microsoft Visio calculates a value for one cell based on another cell's value.

What cell references can include

Cell references can include shape identifiers (IDs) or names. You can always refer to any shape on the page by its ID, whether the shape is named or not. If a shape hasn't been named, its default name is Sheet. i, where i is the shape ID. The ID is assigned when the shape is created and does not change unless you move the shape to another page or document. If more than one shape on a page has the same name, you must include the assigned ID.

Cell reference syntax and examples

The syntax you use and whether you can refer to a shape by name depend on the relationship between the two objects. These general rules apply:

  • If a shape is a peer of the shape whose formula you are editing, you can refer to the peer shape by name. If the peer shape is a group, you can refer by name to the group, but not its members. Neither can you refer by name to a shape's parent or its parent's peers.
  • You can use Sheet.ID syntax to refer to any shape on the page, whether the shape is in a group or is a parent of a shape.
  • Names that contain nonstandard characters must be enclosed in single quotation marks. Single quotation mark characters in a nonstandard name must be prefixed by a single quotation mark.
To reference a cell of Use this syntax Example
The same shape
A shape, group, or guide
A shape, group, or guide in which more than one shape at the same level has the same name
A named column with indexed rows
An unnamed column with indexed rows
Any shape, page, master, or style
A master
The page or master page on which the object is located
Another page in the document
A style
The document
A shape, page, master, document, or style with a nonstandard name. 'Sheetname'!CellName