Table of contents

Using the Nz command

Last modified
Table of contents

 

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,[*TO]") counts the number of nonzero accounts in the named range TO 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.  So 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

Page statistics
43 view(s) and 4 edit(s)
Social share
Share this page?

Tags

CCH CGT & Dividend Scheduling

Comments

You must to post a comment.

Attachments

 

 | Cookie Policy | Copyright | Privacy Policy Terms of Use | Contact Us |