Sometimes you need to do certain utility tasks such as formatting a date range, evaluating a function/formula, or doing array calculations. The Jet Utility function, NP, will do these tasks for you. For a full list of the capabilities (and additional examples) of the NP function, see the |
NP Func. Reference |

The following example formats a date range from 1/1/04 to 12/31/04.

**=NP("DateFilter","1/1/04","12/31/04")**

This above function will return 1/1/04..12/31/04. The first argument tells Jet that this NP function will create a date filter that can be used by an NL function. The second argument is the start date of the filter, and the last argument is the end date of the filter. See the Calculating Date Filters section for more details.

The next example evaluates the volatile Excel **Now()** function, preventing it from slowing down your report.

**=NP("Eval","=Now()")**

The above function will return the current date and time. The first argument tells Jet that this NP function will evaluate a function or formula. The second argument is the function or formula to evaluate.

The following example takes the intersection of two arrays.

**=NP("Intersect",{"1","2","3"},{"2","3","4"})**

The above function will return {2, 3}. The first argument tells Jet that this NP function will return the intersection of two arrays. The second and third arguments are the arrays for which to find the intersection.

See also: our **Array Calculations** article discussing functions NL("Filter"), NP("Join"), NP("Union"), and NP("Split")

## Comments