This section explains the Nz command, which may be used within a formula.

Nz Command

The Nz command counts the number of “non-zero” accounts in a range. This means the number of accounts to be printed by a RangeDef command. If both current and comparative balances are being printed you can use the Nz command to count the number of accounts that are nonzero in either the current or comparative year. For instance:

=AP("Nz,ab,0001..0099") counts the number of nonzero accounts in the range 0001..0099 for either the current or comparative year. 
=AP("Nz,ab,[*TOTREV]") counts the number of nonzero accounts in the named range TOTREV for either the current or comparative year. 

The Nz command is useful in conditions that control whether a heading at the start of a group of accounts is printed, or whether the subtotal at the end is printed.

Parameters

  1. Years to check The first parameter indicates which year balances to count.  “ab” above indicates that accounts with a balance in either the current year or the comparative year should be counted.
  2. Account range This can be either a nominal range or a named range.
    • Nominal ranges can be specified either with or without the [( and )] brackets, e.g. =AP("Nz,ab,0001..0099")  or =AP("Nz,ab,[(0001..0099)]"). Also, pattern matching nominal ranges are permitted, e.g. =AP("Nz,ab,8101~8901").
    • Named ranges are enclosed in "[*" and "]" brackets.
  3. Subaccounts This should be "s" if subaccounts are to be counted, e.g. =AP("Nz,ab,0001..0099,s"). Otherwise only main accounts are counted.
  4. Debit/credit only This should be  "deb" to count only debits and "cred" to count only credits.

Notes

If account codes are specified in the range, then both the From and To account must be specified.  Therefore, if you only want to check a single account, say 7010, do not use =AP("Nz,ab,7010"). Instead use =AP("Nz,ab,7010..7010").

Related documents

CCH Accounts Production/iXBRL essentials training online (10133804)/(10133819)
This document outlines a course on using CCH Accounts Production software, aimed at helping new users efficiently produce statutory accounts. The course includes 1 x 2 hour session and 1 x 3 hour session focusing on practical skills such as setting up accounting periods, importing trial balances, and navigating the software. It is designed for all employees involved in preparing statutory accounts. Training is conducted in an interactive environment called CloudShare, with additional resources available online for further learning and support.
CCH Accounts Production: essentials training online (10133819)
This document outlines a course on using CCH Accounts Production software, aimed at helping new users efficiently produce statutory accounts. The course includes two 2-hour sessions focusing on practical skills such as setting up accounting periods, importing trial balances, and navigating the software. It is designed for all employees involved in preparing statutory accounts. Training is conducted in an interactive environment called CloudShare, with additional resources available online for further learning and support.
CCH Accounts Production 2026.3 Hotfix: Release Notes
Release Notes for CCH Accounts Production 2026.3 Hotfix
CCH Accounts Production 2026.3: Release Notes
Release Notes for CCH Accounts Production 2026.3
CCH Accounts Production 2026.2: Release Notes
Release Notes for CCH Accounts Production 2026.2