# NxSubset - Time Series Subset

Returns the subset of an array of cells.

## Syntax

NxSubset(X, start, finish, keepNA)

X
is the input data set (a one-dimensional array of cells (e.g., rows or columns)).
Start
is the first element index from the beginning of X (positive value) or the end of X (negative value). If missing, start = 1.
Finish
is the last element index in X from the beginning of X (positive value) or the end of X (negative value). If missing, end = the last element in X.
KeepNA
is a flag for leaving (or purging) observations with missing values (e.g., #N/A, #VALUE!, #NUM!, or empty cell) found in the input data set. If missing, keepNA = False.

## Remarks

1. The input data set may include empty and missing values.
2. The input data set may span multiple rows and/or columns, but the result is always a one-dimensional array (i.e., a column).
3. If keepNA is set to False (0), observations with missing values (e.g., #N/A, #VALUE!, #NUM!, or empty cell) in the input data set are purged prior to selecting the subset.
4. Positive values of the start and finish indices are relative to the beginning of the data set. For example, setting start = 5, would be evaluated as the 5th element in the array.
5. Negative values of the start or finish indices are relative to the end of the data set. For example, setting start = -1 would be evaluated as the last element, start = -5 would be the 5th element before the end of the array.
6. In the case where the start index is negative and the finish index is positive, then function append the results of [Start, end] + [start, Finish].
7. The function NxSubset has been revised in NumXL MARTHA 1.67.

## References

• Hamilton, J .D.; Time Series Analysis , Princeton University Press (1994), ISBN 0-691-04289-6
• Tsay, Ruey S.; Analysis of Financial Time Series John Wiley & SONS. (2005), ISBN 0-471-690740
• Kenney, J. F. and Keeping, E. S. (1962) "Linear Regression and Correlation." Ch. 15 in Mathematics of Statistics, Pt. 1, 3rd ed. Princeton, NJ: Van Nostrand, pp. 252-285.