Converts a 3-column representation (i.e., X, Y, and Z) into a two-dimensional table.

## Syntax

**NxFold**(**X**, **Y**, **Z**, X-Levels, Y-Levels, KeepNA)

**X**- is a range of cells (one-dimensional array) of the 1st variable (X) - independent.
**Y**- is a range of cells (one-dimensional array) of the 2nd variable (Y) - independent.
**Z**- is a range of cells (one-dimensional array) of the 3rd variable (Z) - dependent.
**X-Levels**- is a one-dimensional array of cells (e.g., rows or columns) for corresponding desired output levels/values of X (1st variable) in the data table. If missing or omitted, all levels found in X are assumed.
**Y-Levels**- is a one-dimensional array of cells (e.g., rows or columns) for corresponding desired output levels/values of Y (2nd variable) in the data table. If missing or omitted, all levels found in Y are assumed.
**KeepNA**- is a flag for leaving (or purging) observations with missing values (e.g., blank, #N/A, #VALUE!, #NUM!, empty cell) in the input data set. If missing or omitted, keepNA is assumed to be False.

## Remarks

- The NxFold function must be entered as an array formula in a two-dimensional cell range with the same number of rows as X-levels and columns as Y-levels.
- Use NxFold to transform the representation or the format of a 3D data set (X, Y, Z) into a tabular form suitable for data visualization (i.e., plotting) and/or interpolation.
- The observations in X, Y, and Z can have any order and are not assumed to be sorted.
- The X and/or Y arrays may have missing values (#N/A). In this case, NxINTRPL will remove those entries.
- The Z arrays may have missing values (#N/A). NxFold keeps/removes those entries based on the "KeepNA" flag setting only if corresponding X and Y values are given (i.e., not missing).
- The X-Levels and Y-Levels may have missing values (#N/A). In this case, NxFold will remove those entries.
- The X-Levels and Y-Levels can have any order. No sorting is required.
- The values in X-Levels must be unique. Duplicate values, if found, are removed.
- The values in Y-Levels must be unique. Duplicate values, if found, are removed.
- The NxFold() function is available starting with version 1.66 PARSON.

## Files Examples

## References

- John Walkenbach (2002).
*Excel charts*. Wiley. ISBN 978-0764517648.

## Comments

Please sign in to leave a comment.