RepeatUntil

Repeats the execution of specified cells until either an exit condition becomes valid or the maximum number of iterations is reached.For more information, see Create a Loop of Spreadsheet Cells.

Note: When creating a repeating iteration of cells using the Repeat or RepeatUntil functions, if using a SetEvent function, it should be placed outside the cells being iterated.Placing the SetEvent function within the cells being iterated may cause the SetEvent to miss event triggers.

RepeatUntilInputs

Syntax: RepeatUntil(Event,Exit Condition,Max Iterations,Cells to Repeat)

Parameter Description

Event

Specifies the event on which to read thespecified Value. This parameter must be a reference to one of the following:

  • The Image data structure in cell A0, containing the AcquireImage function. For more information, see AcquireImage.
  • A cell containing an Event function. For more information, see Event.
  • A cell containing a Button function. For more information, see Button.
  • A cell containing a numeric value, and if the numeric value changes, an event will be triggered.

Exit Condition

Specifies a non-zero value that defines the requirement to exit the repetitions.

Max Iterations

Specifies the maximum number of iterations (0 to 5000) that should be repeated.

Cells to Repeat

Specifies the reference to the cell or cells to be repeated.The reference must be a range of cells, a comma delimited list of cell references or a combination of the two.

RepeatUntilOutputs

Returns

A Loop data structurecontaining data about the repetition of the cells.