AX2295

Combining action tags

When using action code processing, you can combine Copy, Lock, and Unlock tags, so that multiple actions can be performed using the same set of codes.

To combine action tags, separate the tags with a comma, within a single set of brackets. The following example combines a copy tag with a lock tag:

[Copy;A1;Formulas,Lock]

This example copies the formula in A1 into the action cell, and then locks the action cell. The corresponding "simple" tag to create an action tag pair would be [Copy,Lock].

NOTES:  

  • The order of the combined tags does not matter. A tag of [Lock,Copy] is interpreted in the same way as [Copy,Lock].
  • You only need to combine a copy tag with a lock tag if you are not copying formats. If you are copying formats, then the source cell can be locked or unlocked as desired, and this format will be copied to the target cell. However, if you are copying only formulas or values, then you would use a combined copy and lock tag if you want the target cell to be locked.

You can combine any number of action tags into a single tag. If you are using named actions, you can have multiple instances of the same type of action within the same tag. For more information on named actions, see Using named action tag pairs.

You can combine lock and unlock codes in the same tag, so that the same tag can be used for different lock and unlock action tag pairs. In the following example, the tag in the control column has a combined lock and unlock tag, so that it can form a valid action tag pair with both of the lock and unlock tags in the control row. The blue cells in E8:H8 will be locked, and the orange cell in I8 will be unlocked.

Combined lock / unlock example

If the tag in C8 was just [Lock], then it would not match with the unlock tag in cell I4, and no action would be performed on I8.