Skip to content
REFERENCE

U.RESHAPE

Summary

Changes the positions of cells within a range or inverts data and labels in a table

Syntax

=U.RESHAPE(data, [write_num_cols], [write_num_rows], [write_down], [read_num_cols], [read_num_rows], [read_down])

Parameters

Parameter Required Description
data Yes The data to be reshaped
[write_num_cols] No The number of columns to write at across rows at a single time. Default is width of calling range if not set, unless calling range is a column vector in which case the value is calculated
[write_num_rows] No The number of rows to write before writing to the next batch of columns. If not set then is the height of the calling range if the calling range is a column vector else it is calculated
[write_down] No Set to TRUE to write values in columns from top to bottom. Default if not set is to write values in rows from left to right, unless both data and calling range are column vectors and neither 2nd nor 3rd parameters are specified...in which case writing is top-to-bottom
[read_num_cols] No The number of columns to read at across rows at a single time. Default is to read all columns at once if not set
[read_num_rows] No The number of rows to read before reading from the next batch of columns. Default is to read all rows to the bottom of the input data if not set
[read_down] No Set to TRUE to read values in columns from top to bottom. Default if not set is to read values in rows from left to right

Behavior

The documented public interface is supported by the current U Add-in source signature and the maintained Usage Examples workbook. Optional parameters are shown in square brackets in the syntax above; omit the brackets when entering a formula.

Return Value

Returns the function result or action status described by the formula and parameters above. The maintained sources do not define a narrower, stable return contract for this function.

Examples

=U.RESHAPE(B4:B9)
=U.RESHAPE(B4:B9,ROWS(B4:B6))
=U.RESHAPE(B4:B9,,,TRUE)

Notes

  • Formula examples are preserved from maintained workbook usage and normalized to the current U. prefix.
  • Complete formulas demonstrate working patterns; they do not imply that undocumented option values are supported.
  • Where maintained sources do not specify every accepted value, default, or error message, this page does not infer one.
  • For functions that perform actions, use a visible trigger or supported block/throttle parameter to avoid unintended repetition during recalculation.