135
Audit Commander User Guide Data analysis made easier… EZ-R Stats, LLC

Audit Commander User Guide

Embed Size (px)

DESCRIPTION

Use of the Audit Commander for performing audit tests

Citation preview

Page 1: Audit Commander User Guide

Audit CommanderUser GuideData analysis made easier…

EZ-R Stats, LLC

Page 2: Audit Commander User Guide

Audit Commander User Guide

Audit Commander

The software described in this document may be freely downloaded and used without restriction. Additional information about the audit software is available at the web site http://ezrstats.com.

The EZ-R Stats, LLC name and EZ-R Stats, LLC logo are trademarks or registered trademarks of EZ-R Stats, LLC.

All other trademarks are the property of their respective owners.

All comments and suggestions are welcome.

Page 3: Audit Commander User Guide

Audit Commander User Guide

Document History

Revision HistoryRevision

Number

Revision Date Summary of Changes Author

1.0 7-30-2009 Initial Version M. Blakley

1.1 9-4-2009 Minor edits M. Blakley

1.2 9-14-2009 Monitoring update version 1.88 M. Blakley

Audit Commander User Guide Copyright 2009 Page 3 of 135

Page 4: Audit Commander User Guide

Audit Commander User Guide

Table of Contents1 ABOUT THIS GUIDE .......................................................................................................................... 6

1.1 WHO SHOULD USE IT ........................................................................................................................ 6

1.2 TYPOGRAPHICAL CONVENTIONS ........................................................................................................... 7

1.3 PURPOSE ........................................................................................................................................ 7

1.4 SCOPE ........................................................................................................................................... 8

1.5 INTENDED AUDIENCE ........................................................................................................................... 8

1.6 HARDWARE REQUIREMENTS .................................................................................................................. 8

1.7 SOFTWARE REQUIREMENTS .................................................................................................................. 8

2 GETTING STARTED .......................................................................................................................... 9

2.1 SUGGESTIONS .................................................................................................................................. 9

2.2 DATA EXERCISES ............................................................................................................................... 9

2.3 HOW TO USE THE SOFTWARE ................................................................................................................ 9

2.4 PRIMARY MEANS TO USE THE SOFTWARE. ................................................................................................. 9

3 AUDIT QUERIES .............................................................................................................................. 11

3.1 OVERVIEW ..................................................................................................................................... 11

3.2 BENEFITS ...................................................................................................................................... 11

3.3 THE BASIC FORM ............................................................................................................................. 12

3.4 THE BASIC ELEMENTS ....................................................................................................................... 16

3.5 ADDITIONAL INFORMATION FIELDS ......................................................................................................... 20

3.6 STATUS BAR .................................................................................................................................. 20

3.7 REFINING THE QUERY ....................................................................................................................... 20

3.8 TYPES OF QUERIES .......................................................................................................................... 24

4 ELECTRONIC WORK PAPERS ....................................................................................................... 45

4.1 OVERVIEW ..................................................................................................................................... 45

4.2 EXAMPLE USAGE ............................................................................................................................. 45

4.3 BENEFITS ...................................................................................................................................... 45

4.4 THE BASIC FORM ............................................................................................................................. 46

4.5 REPORT TAB .................................................................................................................................. 48

4.6 DEFINING THE AUDIT PROCEDURES ....................................................................................................... 49

4.7 RUNNING THE COMMANDS .................................................................................................................. 49

5 MONITORING .................................................................................................................................. 73

Page 5: Audit Commander User Guide

Audit Commander User Guide

5.1 OVERVIEW ..................................................................................................................................... 73

5.2 EXAMPLE USAGE ............................................................................................................................. 74

5.3 BENEFITS ...................................................................................................................................... 74

5.4 THE BASIC FORM ............................................................................................................................. 74

5.5 CHARTS ....................................................................................................................................... 76

5.6 SPECIFYING HOW THE GRAPHICS ARE PREPARED ...................................................................................... 80

5.7 COMMAND DETAILS TAB ..................................................................................................................... 80

5.8 TYPES OF MONITORING .................................................................................................................... 81

6 MACROS ......................................................................................................................................... 98

6.1 OVERVIEW ..................................................................................................................................... 98

6.2 BENEFITS ...................................................................................................................................... 98

6.3 SETTING UP THE MACROS .................................................................................................................. 98

6.4 THE EWM CLASS .......................................................................................................................... 98

6.5 “REGISTERING” THE DLL ................................................................................................................... 98

6.6 RUNNING THE MACROS ..................................................................................................................... 99

6.7 ERROR HANDLING ........................................................................................................................... 99

6.8 TYPES OF COMMANDS ..................................................................................................................... 100

7 INSTALLATION .............................................................................................................................. 130

7.1 OVERVIEW ................................................................................................................................... 130

7.2 SILENT VS. “REGULAR” INSTALL ........................................................................................................ 130

7.3 REGISTERING THE SOFTWARE ........................................................................................................... 130

7.4 INSTALLATION OPTIONS .................................................................................................................... 130

7.5 INSTALLATION TROUBLE SHOOTING ..................................................................................................... 130

7.6 IF THERE ARE PROBLEMS DURING THE INSTALLATION, CONSIDER THE FOLLOWING POINTS: .................................. 130

7.7 FILES/DATA THAT ARE INSTALLED ........................................................................................................ 131

7.8 REGISTRY ENTRIES THAT ARE CREATED ................................................................................................ 131

8 APPENDIX A – EXAMPLE ELECTRONIC WORK PAPERS .......................................................... 132

9 APPENDIX B – EXAMPLE MONITORING FILES .......................................................................... 134

Audit Commander User Guide Copyright 2009 Page 5 of 135

Page 6: Audit Commander User Guide

Audit Commander User Guide

1 About this guide

This document is divided into the following chapters:

• Chapter 1 - Overview

• Chapter 2 - Getting Started – a brief introduction using example data and audit tests

• Chapter 3 - Audit Queries – obtaining useful audit information using queries

• Chapter 4 - Electronic work papers

• Chapter 5 - Setting up monitoring systems

• Chapter 6 - The macro facility

• Chapter 7 - The software installation process

• Appendix A – Example Electronic work papers

• Appendix B – Example Monitoring Files

1.1 Who Should Use It

Auditors, researchers, business analysts and academics who use data analytics to perform their

jobs.

• Auditors: can use the software to support their audit tasks

• Researchers: use the software for:

• Data analysis

• Data mining

• Statistical reports and charts

Page 7: Audit Commander User Guide

Audit Commander User Guide

1.2 Typographical Conventions

This document uses the following typographical conventions:

• Command and option names appear in bold type in definitions and examples.

• Screen output and code samples appear in monospace type.

1.3 Purpose

The purpose of the software is to simplify and streamline the audit process as it relates to data

analysis. By making data analysis procedures easier, more auditors will be able to use the

software and apply it to their audit tasks.

Used for the most commonly performed audit tests. Includes 30+ commonly performed audit

procedures. The software is designed to work with data that is already in a format familiar to the

auditor, i.e. Microsoft Excel or Microsoft Access. The software also works with data which has

been “exported” from other systems and is in text format.

The auditor does not need special computer skills in order to be able to analyze existing data

and apply a variety of “canned” audit procedures using a menu driven system. Output from the

system can be easily imported into Excel for documentation or further analysis. In many cases

the software outputs the results in chart format as well, to help provide a visual representation of

the results of the audit tests performed.

Development of the software began in August 2005 when the author searched fruitlessly for a

relatively easy to use, economical software package for common data analysis routines needed

by auditors. During its development, suggestions and improvements were made by a variety of

audit practitioners.

More information about the system is available from the website, http://ezrstats.com.

Audit Commander User Guide Copyright 2009 Page 7 of 135

Page 8: Audit Commander User Guide

Audit Commander User Guide

1.4 Scope

The purpose of this guide is to explain how the software can be used. As future versions are

released, registered users can obtain updates to this document in electronic format.

1.5 Intended audience

The software is intended for use by both internal and external auditors, researchers, students

learning auditing and data mining, business analysts and anyone else interested in data

analytics.

1.6 Hardware requirements

At least 512 MB of memory (more if possible). Minimum disk space is 27 MB.

1.7 Software requirements

Works only in Windows XP, Vista or Windows 7. Requires ActiveX Data Objects which is part of

SP1. (ActiveX Data Objects can be downloaded from the Microsoft web site at no charge)

Page 9: Audit Commander User Guide

Audit Commander User Guide

2 Getting Started

2.1 Suggestions

Below are the suggested steps for getting started with the Audit Commander.

1. Installation is a standard "setup.exe". For detail instructions, please visit the instruction page at http://ezrstats/com/General/Install.html.

2. You may wish to register for the electronic bulletin board. Instructions to do so are provided at http://ezrstats.com/Forums.html.

3. Query files are included as part of the standard software installation and are named Query.ini and Monitor.ini.

4. The tutorials page on the website has links to both videos and slide shows. Tutorials page is at http://ezrstats.com/tut.html.

5. If you register for the electronic bulletin board (no cost) you may post questions and search for answers to your questions. Note that the forum is publicly available.

6. A monthly newsletter of various audit topics is available free (must register). Signup form is available under "Newsletter". at http://ezrstats.biz.

2.2 Data exercises

To obtain a working overview of the system, walk through an example audit of fixed assets using

the electronic work paper examples already set up. Step by step instructions are provided at

http://ezrstats.com/Tutorial1.html.

2.3 How to use the software

2.4 Primary means to use the software.

There are four primary methods to use the software:

Ad Hoc Queries

Electronic work papers

Audit Commander User Guide Copyright 2009 Page 9 of 135

Page 10: Audit Commander User Guide

Audit Commander User Guide

Monitoring

Macros

Generally, use of the software begins with the Ad Hoc query facility. This enables the auditor to

perform various “exploratory” type queries in order to perform specific audit tests and also to

possibly begin the foundation for developing electronic work papers or establishing a monitoring

system.

An option of the ad hoc query system is to “log” the queries. This results in a log file which may

then be incorporated into or used with both the electronic work paper facility as well as the

monitoring facility. This file may also be constructed (or edited) manually using any standard text

editor such as Word Pad. The electronic work paper facility is designed to provide a repeatable

process, e.g. audits and audit procedures that are performed on a recurring basis. Advantages

are that the audit procedures developed may be shared and re-used, reducing audit time in

certain instances.

The monitoring facility adds on to the ad hoc query facility and the electronic work papers. The

intent is to develop automated procedures which can alert the auditor when unusual or out of the

ordinary transactions occur. This facility is developed based upon the auditors knowledge and

experience with the systems being audited. Although there is currently no procedure to have

these monitoring processes performed automatically, such procedures are currently being tested

with the intent of release by January 2010.

Page 11: Audit Commander User Guide

Chapter 3 – Audit Queries

3 Audit Queries

Ad-hoc data queries are commonly required during audits, but all too often time consuming to

perform. However, many auditors are comfortable using menus and forms with “fill in the

blanks”. This chapter describes a method for auditors who need to perform common audit

procedures on data stored in Microsoft excel or Access databases, or who need to work with

data that has been imported/exported from/to other systems (e.g. databases) and is available in

text file format.

3.1 Overview

The audit query facility consists of 30+ commonly performed data analytics which can be used to

perform audit steps or provide a support function. Each of these query facilities are menu

driven, work with data in both Excel, Access and text file format and output the results as charts

and electronic work papers.

In addition, each query has certain “drill down” capabilities which enable the auditor to focus on

specific transactions or other data of specific audit interest. For example, the auditor may be

interested in specific date ranges, specific geographic locations, amounts etc. An optional

logging facility provides a means to capture the queries as they are performed so that they may

be re-performed, shared or included with an electronic work paper or monitoring system.

3.2 Benefits

The primary benefits of an ad hoc query system are the reduction of audit and training time to

enable to the auditor to perform data analytics and other procedures in support of the audit

function. Additional benefits are the preparation of audit documents used to explain and define

the audit procedures that were performed, the results obtained and the conclusions that the

auditor arrived at.

Note: The system uses standard Windows type menus in order to reduce the amount of time required to be productive.

Page 12: Audit Commander User Guide

Chapter 3 – Audit Queries

3.3 The basic form

The ad hoc query process begins by selecting the menu item "Audit Tests" | "General". This

results in the opening form displayed below.

Figure 1 – Opening form

Page 13: Audit Commander User Guide

Chapter 3 – Audit QueriesThe key driver of the form is the “Analytical Function” menu item in the upper left hand corner of

the form. This menu items groups the audit commands into five categories, depending upon the

type of audit procedure being performed:

Numeric:

The nine functions below perform various analyses on numeric data.

Figure 2 Numeric commands

Audit Commander User Guide Copyright 2009 Page 13 of 135

Page 14: Audit Commander User Guide

Chapter 3 – Audit Queries

Date

Figure 3 – date commands

Other

Figure 4 – Other commands

Page 15: Audit Commander User Guide

Chapter 3 – Audit QueriesPatterns

Figure 5 – Pattern commands

Sampling

Figure 6 – Sampling commands

Audit Commander User Guide Copyright 2009 Page 15 of 135

Page 16: Audit Commander User Guide

Chapter 3 – Audit Queries

Every menu item selected will present the same basic form for data collection.

This opening form contains six tabs.

This is the main form where the specifics of the query are provided. This form is also used to run

the query.

Figure 7 – The Query form

3.4 The basic elements

3.4.1 Data sourceThe data being audited may exist in various file formats. Audit Commander can analyze data in

Excel format (Office 2003 and 2007), Access format (Access 2002 and 2007), or text files (e.g.

comma separated values (CSV) format, tab separated value (TSV), fixed columns and DBASE

Page 17: Audit Commander User Guide

Chapter 3 – Audit QueriesIV. The example illustrated uses the commonly used data format - Excel. This data source format

(Excel) is selected as the first item shown in the drop down list Diagram 1.

Figure 8 – Data source

Audit Commander User Guide Copyright 2009 Page 17 of 135

Page 18: Audit Commander User Guide

Chapter 3 – Audit Queries

3.4.2 Command

Version 1.84 of the software supports 30+ common audit procedures or functions, each of which

may be selected from a menu as shown in the figure below: In this example the statistics

function will be used which provides a variety of information about the population statistics for

the transactions being analyzed.

Figure 9 – Audit commands

3.4.3 Location of data file

The next form element is the button labeled “Data File Source”. Clicking on this button brings up

an “Explorer” type form where the file or directory may be selected. For Excel and Access, a

work book or database file is selected. For text files (including Dbase IV), a directory is selected.

3.4.4 Sheet/Table

The next data element to be specified depends upon the type of data source selected. If Excel

has been selected as the data source, it will be labeled “Work Sheet”. If Access has been

selected, it will be labeled “Table”. If a text data source has been specified it will be “Directory”.

Page 19: Audit Commander User Guide

Chapter 3 – Audit QueriesThis information will be made available using a drop-down list. The values in the drop down list

will depend upon the type of data source.

• For Excel, the list will include all work sheets within the selected workbook as well as any

“named ranges” if any have been defined.

• For Access, the list will include all tables within the database, as well as any queries, if

any have been established.

• For text files, the list will include all files within the directory specified. Note that in order

to process text files, a specially formatted file name “schema.ini” must have been set up.

(More information on this topic is available at ).

3.4.5 Column

Most (but not all) of the audit procedures base their analysis on values contained in a column of

information. For example, in Excel, a worksheet containing invoice payment information may

have a column labeled “Invoice Amount”. In Access, a table may exist for invoice payments, one

column of which is named “Invoice Amount”. For text files, one of the columns of information

may also be labeled “Invoice amount” on the first row, with details in the following rows. The

particular column of interest is selected using a drop-down list of possible values.

3.4.6 Refining the query

The next element of information is labeled “Criteria”. Here the auditor can specify how the

analysis is to be narrowed to just certain rows of interest. For example, in an audit of accounts

payable, a particular audit step may wish limit the analysis to just invoices for a particular state

or other location, time period, dollar amount, etc. Simple examples would include “amount >

100”, “State = ‘NE’”, etc. (There is a detailed discussion of how to compose criteria in section

3.7). If the criteria value is left blank, then all rows are analyzed (i.e. no exclusions of data from

the analysis).

3.4.7 Other information

There is a comment area where the auditor can explain the purpose of the procedure being

performed. This information will then be made available in the work paper documents produced

for this audit step. Although it is preferable to complete this information to better explain and

document the work performed, no explanation is required.

3.4.8 Form buttons

Audit Commander User Guide Copyright 2009 Page 19 of 135

Page 20: Audit Commander User Guide

Chapter 3 – Audit Queries

At the bottom of the form are two buttons “OK” and “Exit”. The “OK” button is used to run the

audit command. The “Exit” button is used to close the form and return to the main Audit

Commander menu.

For those procedures which produce a chart, when the “OK” button is clicked and the procedure

is performed, a “View Chart” button will be displayed in case the auditor wishes to view the

results as a chart. (The chart is produced regardless, the button is just a means to easily view

it).

3.5 Additional information fields

Some commands will require certain additional information. For example, for an ageing

analysis, the ageing date, width of the ageing bucket, name of the amount column, etc. will be

required. In all these cases, additional information gathering fields will be displayed when the

command is selected.

3.6 Status Bar

The bottom part of the form contains a status bar. This area is used to display information such

as error summaries, names of files produced, system status, etc.

3.7 Refining the query

Overview.

If the criteria box for a query is left blank, then all records in the data source are selected.

However, it is possible to “drill down” to just selected records of interest by specifying “criteria”

which must be met in order to be selected. Use of criteria is a very commonly performed audit

task. Examples include selecting a subset of records for testing, identification of potential error

conditions and obtaining data for further analytical review purposes.

Criteria are specified using:

• Column names defined at the top of the Excel Sheet or in the Access database,

• Symbols or mathematical operators such as “+”, “-“, “<”, etc.

• Function names such as “weekday”, “hour”, “left”, “right”, etc.

• Literals such as a specific vendor number, store location, state code, etc.

Page 21: Audit Commander User Guide

Chapter 3 – Audit Queries• Logical operators such as “OR”, “AND”, “NOT”

Column Names

Generally most column names can be used for processing. However, there are some

restrictions which apply:

1. If a column name contains embedded blanks, then it must be enclosed in brackets, e.g. [Asset Cost]

2. A column name cannot contain special characters such as apostrophes, commas, quota-tion markets, brackets or parentheses.

3. Some column names are “reserved words”. Examples include “select”, “from”, “as”, “table”, “into”, “between”, “like”, “where”, etc. A complete list of such names is being de-veloped and will be posted on the web site – search “reserved words” on the home page.

Possible Errors

The system attempts to detect any possible errors in the criteria specified before processing

them. However, the system can not detect all possible errors. Examples of the types of errors

which are detected include the following:

1. Column name not found (misspelled or doesn’t exist)2. Unbalanced parentheses – must have same number of left and right parentheses3. Unbalanced brackets – must have the same number of left and right brackets4. Unbalanced apostrophes – must be evenly divisible by two5. Unbalanced quotes – must be evenly divisible by two6. Commas not allowed as separators in numeric values

Audit Commander User Guide Copyright 2009 Page 21 of 135

Page 22: Audit Commander User Guide

Chapter 3 – Audit Queries

Compound (complex) conditions

It is possible to test for fairly complex conditions by using the “AND”, “OR” and “NOT”. For

example:

1. Condition-1 AND Condition-2 will only be selected if both conditions are true.2. Condition-1 OR Condition-2 will only be selected if one or both conditions are true.3. Not Condition-1 will only be selected if coniditon-1 is FALSE.

Conditions may also be further enclosed and grouped within parentheses for more complex

conditions. For example:

Condition-1 OR (Condition-2 AND Condition-3)

Comparison Operators

There are six comparison operators which may be used either for text, numbers or dates:

1. < Is less than2. > Is greater than3. = Is equal to 4. <= Is less than or equal to5. >= is greater than or equal to 6. <> is not equal to

Page 23: Audit Commander User Guide

Chapter 3 – Audit QueriesText Operators

Text can be tested using the following criteria

1. Left(text, text length) takes the leftmost number of characters2. Right(text, text length) takes the rightmost number of characters3. Mid(text,start position, length) takes characters from the middle4. Like(text) for comparison tests (*, ?, % as wildcards)5. Instr(text) tests for existence of a character6. LCase(text) changes to lower case7. UCase(text) changes to upper case

Examples

Description ExampleLeft two characters of the store code are ‘AB’ left(storecode,2) = ‘AB’Rightmost two characters on the store code are ‘AB’ Right(storecode,2) = ‘AB’Character in position 2 and 3 of store code is ‘AB’ Mid(storecode,2,2) = ‘AB’Store code begins with A Storecode like ‘A%’Text contains the specific characters ‘ABC’ Instr(storecode,’ABC’) > 0 Location code expressed as lower case is ‘ab’ Lcase(location) = ‘ab’Location code expressed as upper case is ‘AB’ Ucase(location) = ‘AB’Store code starts with A, then followed by F-Z then

anything

Storecode like ‘A[F-Z]%’

Figure 10 – Opening form

Date Operations

Date literals must be enclosed with #. For example, acquisition_date > #6/30/2005# tests for

acquisition date greater than June 30, 2005. To test a range, use the ‘BETWEEN’ operator. For

example dates within the fiscal year ended May 31, 2008 could be extracted using the statement

[date of interest] between #6/1/2007# and #5/31/2008# where [date of interest] is a date column.

The following date operators are supported:

• Weekday

• Hour

• Minute Audit Commander User Guide Copyright 2009 Page 23 of 135

Page 24: Audit Commander User Guide

Chapter 3 – Audit Queries

• Second

Examples

Description ExampleDate is on a Sunday Weekday(acqdate) = 1Date is on a weekend Weekday(acqdate)

between 1 and 2Time is between midnight and 5:59 Hour(acqdate) between 0

and 5

Figure 11 – Opening form

Math Functions

Math functions include the following:

Description ExampleAbsolute value Abs(cost) > 100Logarithm Log(cost) > 3Round Round(cost,2) > 98Random Rnd()Integer portion is 500 Int(cost) = 500

Figure 12 – Opening form

3.8 Types of queries

There are some 30+ queries or audit commands which can be selected for processing. These

commands are grouped into five classes based upon the type of function performed – 1)

numeric, 2) date, 3) other, 4) patterns and 5) sampling. For each command, a brief explanation

of the purpose and use of the command is provided, an explanation of the meaning of any “other

information” which must be provided. For each command, there are further examples and

example output contained on the CD which is distributed with the software.

3.8.1 Numeric

Page 25: Audit Commander User Guide

Chapter 3 – Audit QueriesPopulation StatisticsDescription / Use

The statistics command can be used for a variety of purposes, including:

• Obtaining counts of transactions meeting a condition or criteria• Obtaining transaction totals• Obtaining univariate statistics for the reasonableness tests, sample planning, etc.• Obtaining histogram information• Obtaining percentile information

Other information required (if any)

Note: There is no other information required for the statistic command

Round NumbersDescription / Use

Every numeric amount can be classified as either being a round number or not. A round number

is one which has no pennies to the right of the decimal point and contains one or more

consecutive zeros immediately to the left of the decimal point.

The purpose of the round number test is to classify and quantify all numbers to identify potential

estimated amounts, and prepare a report summary as to their status and type.

Other information required (if any)

Note: There is no other information required for the statistic command

Audit Commander User Guide Copyright 2009 Page 25 of 135

Page 26: Audit Commander User Guide

Chapter 3 – Audit Queries

Benford’s LawDescription / Use

The Benford’s Law command is generally used as part of a fraud or other forensic investigation.

The purpose will be to determine if numeric values on a schedule conform with that which is

expected using Benford’s Law.

Other information required (if any)

Tests using Benford’s law must specify the type of test being

performed:

F1 – Test of the first digit

F2 – Test of the first two digits

F3 – Test of the first three digits

D2 – Test of the second digit only

L1 – Test of the last digit

L2 – test of the last two digits

Figure 13 – Opening form

StratifyDescription / Use

The data stratification procedure classifies numeric amounts into “buckets” or value ranges

specified by the auditor. The purpose is to classify numeric amounts in order to determine the

most frequently occurring values, largest and smallest values, etc. Stratification is often used for

sample planning (stratified sampling, reasonableness tests) as well as audit planning in general.

Other information required (if any)The values to be used for the strata (specified in ascending order

and separated by spaces). An example strata specification is “-

1000 -500 0 300 2000 4000 6000”. Note that the strata values do

not need to be evenly spaced. If any values are found outside the

end of the strata specified, those values are reported separately.

Warning: If strata values are not numeric, or not in ascending order, invalid results may be

obtained.

Summarization

Page 27: Audit Commander User Guide

Chapter 3 – Audit QueriesDescription / Use

The summarization function obtains not only totals by each control break that is specified, but

also other information such as minimum and maximum values, averages and standard deviation.

There is no limit as to the number of columns which make up the control break. A control break

may consist of a single column, e.g. sub-totals by vendor would be specified as just a single

column name – “vendor”. If subtotals were needed by region by vendor, then the control break

specification would be “region, vendor”.

Note: The information being summarized does not need to be “pre-sorted”.

Other information required (if any)The column names making up the control break, and the number of

such columns.

Warning: If the number of columns is missing or improper, errors or invalid results may occur.

Top and Bottom 10Description / Use

The Top and Bottom 10 command is used to identify the largest (or smallest) numeric values

from a population (and criteria can be applied). The number of items required can be specified

as any value. Generally the command is used to identify unusually large (or small) items,

possible outliers or to focus on just the most significant dollar items.

Other information required (if any)The number of items required, e.g. 10, 20, 50 etc.

HistogramsDescription / Use

Three reports are produced:

1. Basic statistics

2. Histogram data

3. Percentile reportBasic statistics include information such as counts, totals, minimum and maximum values, etc.

This information alone can be used to perform certain audit steps such as agreeing transaction

Audit Commander User Guide Copyright 2009 Page 27 of 135

Page 28: Audit Commander User Guide

Chapter 3 – Audit Queries

supporting details to ledger amounts, testing for procedural compliance, etc. Examples of basic

statistics reports can be found in the work papers referenced below:

Other information required (if any)

Note: There is no other information required for the histogram command

Box PlotDescription / Use

The Box Plot command is used to separate a population of numeric values into quartiles in order

to see the values and to also envision how the population is distributed. This provides a little

more information than just the minimum, maximum and median.

Other information required (if any)

Note: There is no other information required for the statistic command

3.8.2 Date

HolidaysDescription / Use

Often it is desirable to check if any transaction dates fall on a federal holiday such as the

Independence Day, etc. Although it may be possible to visually check for these dates, it

becomes more complicated when the date falls on a weekend and is therefore celebrated on the

preceding Friday (or the following Monday). This function can analyze all the dates within a

specified range and quantify the number that fall on each of the holiday dates. There are two

functions related to holidays. One prepares a summary of counts of holiday dates and the other

extracts transactions whose dates fall on federal holidays.

Other information required (if any)Date format – “mdy” for mm/dd/yyyy or “dmy” – dd/mm/yyyy

Country code – “US” or “CA”.

Note: The default values: US and mdy will be used if nothing is specified.

Week daysDescription / Use

Page 29: Audit Commander User Guide

Chapter 3 – Audit QueriesIn many instances the auditor wishes to extract just certain data within Excel based upon days of

the week. In this instance one column or row will contain dates which the auditor wishes to

examine.

Other information required (if any)

Days of the week are extracted based upon a command string

composed of seven zeros or ones. The ones indicate that the

day is to be extracted, a zero indicates that it should be

skipped. Numbering begins with Sunday and goes left to

right. So for example, to extract just Sunday and Monday the

command string would be “1100000”. To extract just Tuesday,

Wednesday and Friday, the command string would be “0011010”.

Perhaps the most common extract is for weekends, which is

denoted by “1000001”.

Holiday extractDescription / Use

In certain instances it is desirable to extract just those transactions in a file which fall on a federal

holiday. These transactions can then be reviewed separately. The holiday extract command

can be used in conjunction with date ranges, location codes or any other criteria which should be

applied as part of the extract.

Other information required (if any)Date format – “mdy” for mm/dd/yyyy or “dmy” – dd/mm/yyyy

Country code – “US” or “CA”.

Note: The default values: US and mdy will be used if nothing is specified.

AgeingDescription / Use

During a review of applications which use both dates and amounts, it is very common to "age"

the data for various purposes - e.g. reasonableness testing, checking for stale or obsolete items,

data classification, etc. The procedure to age data is straightforward:

Other information required (if any)The date to be used for ageing “Ageing Date”

The width of the ageing range, e.g. 30 days

The name of the column with the date to be aged, e.g. “Due Date”

Audit Commander User Guide Copyright 2009 Page 29 of 135

Page 30: Audit Commander User Guide

Chapter 3 – Audit Queries

The name of the column with the amount to be aged, e.g. “Balance

Due”

Date NearDescription / Use

Selection of a range of transactions based upon date value is a very common data extraction

procedure. Examples include cut-off testing, re-testing balances for a specified period, etc.

There are two equivalent procedures for doing such an extraction -

1. DateRange - the auditor specifies a starting and ending date, and

2. DateNear - the auditor specifies a date and the maximum number of days from the date (e.g. three days before or after July 4th)

Other information required (if any)The target date value, and

The maximum number of days before or after this date

Date RangeDescription / Use

Similar test to date range, except a specific dates are provided.

Other information required (if any)

Starting and ending dates for the range.

Week days ReportDescription / Use

The week days report summarizes the count of transactions by day of week. This test may be

used for reasonableness tests, audit planning, etc. The report consist of both text and a chart.

Other information required (if any)

Note: There is no other information required for the weekday command

3.8.3 Other

Gaps in SequencesDescription / Use

Page 31: Audit Commander User Guide

Chapter 3 – Audit QueriesA prime indicator of missing documents is a "gap" in a numeric sequence, such as check

numbers, purchase orders, sales invoices, petty cash slips, receiving reports, etc. The "gaps"

command is used to check a range of data to determine if there are any "gaps" within a range of

numbers.

Other information required (if any)

Note: There is no other information required for the gaps command

Data ExtractionDescription / Use

Many audit procedures require that the records or transactions reviewed be limited to just those

that meet a specified criteria. The process of obtaining this information is termed “data

extraction”. The key to the process is the “criteria” used for the extract. Section 3.7 goes into

the details.

Other information required (if any)The extraction criteria, e.g. “Amount > 100 and [invoice date]

between #7/1/2007# and #6/30/2008#”.

Warning: Dates must be enclosed within pound signs (#). If the pound signs are omitted, invalid

results may be obtained.

Example output

Output will be just those rows (if any) which meet the criteria specified. At a minimum a header

row will be provided.

DuplicatesDescription / Use

Often it is desirable to check if any transactions are exact duplicates. The auditor specifies what

constitutes a duplicate, as ordinarily this will depend upon the values in several columns. As an

example, a duplicate invoice might be defined as the same vendor number, same invoice date

and same invoice number. Note that one or more columns can be used in the search for

duplicate transactions. There is no limit as to the number of columns which may be involved.

Other information required (if any)The names of each column to be tested for duplicates, separated by

commas. For example, if a duplicate invoice is defined as same

vendor number, same invoice number, same invoice date and same

Audit Commander User Guide Copyright 2009 Page 31 of 135

Page 32: Audit Commander User Guide

Chapter 3 – Audit Queries

invoice amount, then the information required would be as follows:

“[Vendor Number],[Invoice Number],[Invoice date],[Invoice Amount]”

(without the quotes).

Page 33: Audit Commander User Guide

Chapter 3 – Audit QueriesSame, Same, DifferentDescription / Use

Unusual or error conditions may be detected using the “same, same, different” test. An example

during a review of invoice transactions would be two invoice payments which had the same

vendor, same invoice number, same date, but different amounts. Similarly, during a review of

the employee master file, two records might be identified which have the same employee last

name, same employee first name, same city, same street, but different social security numbers.

The purpose of the same, same, different procedure is to identify any such records, if they exist.

Other information required (if any)The names of each column to be tested for same, same different,

separated by commas. The last column specified is that which is

tested for being different. For example, in the invoice example

above, the testing specification would be “[Vendor Number],[Invoice

Number],[Invoice date],[Invoice Amount]” (without the quotes).

Confidence BandDescription / Use

The purpose of the confidence band procedure is to perform a linear regression test on

transaction data, and then calculate both confidence intervals and prediction intervals in order to

determine if any amounts might lie outside these bounds. Any such amounts might be tested by

the auditor to ensure that they do not represent errors.

Other information required (if any)The dependent variable (Y-axis), the independent variable (X-Axis)

and the confidence level need to be specified.

Invoice Near MissDescription / Use

The purpose of the confidence band procedure is to perform a linear regression test on

transaction data, and then calculate both confidence intervals and prediction intervals in order to

determine if any amounts might lie outside these bounds. Any such amounts might be tested by

the auditor to ensure that they do not represent errors.

Other information required (if any)The dependent variable (Y-axis), the independent variable (X-Axis)

and the confidence level need to be specified.

Audit Commander User Guide Copyright 2009 Page 33 of 135

Page 34: Audit Commander User Guide

Chapter 3 – Audit Queries

Split InvoicesDescription / Use

The purpose of the split invoice test is to determine if an invoice may have been paid as a single

amount and then also paid with multiple payments totaling the invoice amount. As an example,

an invoice in the amount of $2,700 consisting of three line items of $1,000, $900 and $800 may

have been paid once as $2,700 and then three additional payments made of $1,000, $900 and

$800. The test for split invoices uses certain auditor parameters to determine whether an

invoice amount should be considered, namely the length of time between amounts.

Other information required (if any)

The maximum number of days apart two payments are in order to be considered. For example,

the auditor may wish to consider only those payments to a vendor that are within 10 days of

each other as part of the test for split invoices. Any payment amounts made more than ten days

apart would then not be considered as part of the split invoice test.

Check SSNDescription / Use

The purpose of testing for Social Security number validity is to identify any social security

numbers which would be considered invalid according to the criteria published on the site of the

Social security Administration. The test considers several factors:

Ranges of numbers issued

Certain digits or ranges which are automatically invalid

The highest number assigned for an area

Note: The social security number ranges are published monthly by the Social Security Administration.

Warning: Social security numbers of deceased persons will not be identified.

Other information required (if any)

There is no other information required.

Page 35: Audit Commander User Guide

Chapter 3 – Audit QueriesCheck PO BoxDescription / Use

The purpose of the check P.O. Box command is to examine addresses for an indication that it is

a Post Office Box. Because there are many ways in which a Post Office Box address can be

coded, a procedure devoted to just this type of test is provided. For example, the address may

contain “PO Box”, “POB”, “P.O. Box”, etc.

Other information required (if any)

There is no other information required.

Calculated ValuesDescription / Use

In many instances the auditor wishes to add a column of data, e.g. a calculated amount, based

upon values contained in other columns. This can be accomplished using at least two methods:

Other information required (if any)How the calculated field is determined, e.g. “(Cost – [accumulated

depreciation]) / [useful life)”.

3.8.4 Patterns

Round NumbersDescription / Use

An example will best illustrate the concept of pattern testing for round numbers. Consider a

case where journal entries are prepared at the end of each month. Generally, journal entry

postings will contain some round numbers. Although somewhat tedious, the auditor could

determine the count of round numbers posted for the year. For example, there might be a total

of 2,000individual journal entry postings for the year. Of those, 100 (or 5%) were round

numbers, possibly indicating an estimate. If the round number postings were fairly evenly

spread throughout the year, this would indicate that possibly nothing unusual exists, based upon

a comparative test of round numbers. However, if the concentration is in the last month of the

fiscal year (or the first month of the next fiscal period), then this could be a different situation.

Pattern testing is based upon the overall concept outlined above. The procedure first obtains

counts or totals for the entire transaction population. Then the procedure separates the

population based upon criteria specified by the auditor (in the example above posting month)

and then systematically compares each subgroup with the overall population. The system then Audit Commander User Guide Copyright 2009 Page 35 of 135

Page 36: Audit Commander User Guide

Chapter 3 – Audit Queries

reports each group based upon how different it is from the overall population as measured by

the statistical test “Chi Square”.

This same test can also be applied using metrics other than round numbers – e.g. counts by day

of week, counts by holidays, counts by data stratification, etc.

Other information required (if any)The name of the column used to divide the population into groups,

e.g. store number, month, etc. (This is the name of a single

column).

Note: The transactions do not need to be “pre-sorted”.

Example output

A report which shows the results in descending order, i.e. the most significant differences first.

Data StratificationDescription / Use

An example will best illustrate the concept of pattern testing using stratification. Consider a case

where inventory is being taken at the end of each month at separate warehouse locations.

Unless the warehouses have a significantly different “mix” of items, a stratification of the

inventory values by item will generally follow the same pattern of counts and values. Although

somewhat tedious, the auditor could stratify the amounts manually and then visually compare

the results. For example, one warehouse might have a much larger number of low (or high)

value items than the others. Certainly this could be a valid situation, but it might also represent

an error as well.

Pattern testing is based upon the overall concept outlined above. The procedure first obtains

counts or totals for the entire transaction population. Then the procedure separates the

population based upon criteria specified by the auditor (in the example above warehouse) and

then systematically compares each subgroup with the overall population. The system then

reports each group based upon how different it is from the overall population as measured by

the statistical test “Chi Square”.

Other information required (if any)The name of the column used to divide the population into groups,

e.g. store number, month, etc. (This is the name of a single

column).

The values to be used for the stratification.

Note that the transactions tested do not need to be “pre-sorted”.

Page 37: Audit Commander User Guide

Chapter 3 – Audit Queries

Example output

Day of WeekDescription / Use

An example will best illustrate the concept of pattern testing by day of week. Consider a case for

the retail environment. Generally, sales tend to be concentrated on Fridays, Saturdays and

Sundays, with much lesser amounts on say Monday and Tuesday. If the auditor is looking at a

group of locations (stores), then this test can identify which stores have sales patterns that are

the most statistically different, as measured using standard statistical tests. Although differences

in patterns may be explainable, they may also result from errors. Alternative tests can be

performed using month of year instead of store location, etc.

Other information required (if any)The name of the column used to divide the population into groups,

e.g. store number, month, etc. (This is the name of a single

column).

The name of the column containing the date value to be tested.

Note that the transactions do not need to be “pre-sorted”.

Example output

HolidaysDescription / Use

An example will best illustrate the concept of pattern testing by day of week. Consider a case for

the retail environment. Generally, sales on holidays may be different than those on non-

holidays. If the auditor is looking at a group of locations (stores), then this test can identify which

stores have sales patterns that are the most statistically different, as measured using standard

statistical tests. Although differences in patterns may be explainable, they may also result from

errors. Alternative tests can be performed using month of year instead of store location, etc.

Other information required (if any)The name of the column used to divide the population into groups,

e.g. store number, month, etc. (This is the name of a single

column). Note that the transactions do not need to be “pre-

sorted”.

Audit Commander User Guide Copyright 2009 Page 37 of 135

Page 38: Audit Commander User Guide

Chapter 3 – Audit Queries

Example output

A report which shows the results in descending order, i.e. the most significant differences first.

Benford’s LawDescription / Use

Many accounting transaction amounts will tend to follow that expected using Benford’s law

unless there is a compelling reason that they should not (e.g. upper or lower transaction limits,

recurring amounts, etc.).

The pattern test for Benford’s law separates the population into groups and then computes the

expected and observed values using Benford’s law for that group. An example might be

inventory counts taken at various warehouses. Inventory counts should conform with that

expected using Benford’s Law. By applying a pattern test by warehouse, it is possible to identify

which warehouse had inventory counts that differed the most from that expected using Benford’s

law.

Other information required (if any)The name of the column used to divide the population into groups,

e.g. store number, month, etc. (This is the name of a single

column).

The name of the column containing the numeric value to be tested.

The type of test to be performed (F1, F2, F3, L1, L2, D2).

Note that the transactions do not need to be “pre-sorted”.

Example output

A report which shows the results in descending order, i.e. the most significant differences first.

Fuzzy Match (LD)Description / Use

The technique of measuring the difference between text values based upon Levenshtein

distance was developed by a Russian mathematician. The technique measures the number of

steps required to make two character values match based upon additions, changes and

deletions of text. It is particularly useful in identifying transpositions or other instances in which

the difference between two text strings is minimal. The number of steps required to make the

change is referred to as the "Levenshtein distance".

Other information required (if any)The pattern to be matched against, e.g. employee last name

Page 39: Audit Commander User Guide

Chapter 3 – Audit QueriesThe maximum “distance” that will be considered to be a fuzzy match,

e.g. 3.

Example output

Output will be those records, if any, which meet the matching criteria.

Fuzzy Match (Regular Expression)Description / Use

Selection of subsets of data within a worksheet based upon more complex matching patterns is

possible using the "fuzzy match" command. As an example, the auditor may wish to select all

records for asset tag numbers that begin with "98", followed by any character or digit and then

contain the digit "5". Other examples include all store locations beginning with the letters "A'

through "C", followed by two digits and then one or more of any characters. All of these matches

can be done using the technique of "regular expressions".

There is fairly extensive documentation on how regular expressions work, but they generally

consist of one or more special search characters with the following meanings -

• ? - match any single character

• * - match any one or more characters

• [A-H] - match any single letter between "A" and "H"

• [!A-H] - match any single character, except the letters "A" through "H"In order to do fuzzy matching, the auditor sets

Other information required (if any)The fuzzy match criteria (as explained above).

Example output

Output will be those records, if any, which meet the matching criteria.

3.8.5 Stop And Go Sampling

AttributesDescription / Use

Compliance testing often relies on attribute sampling when a test is to be based upon a random

sample. If segments of a population are expected to have significantly different rates of

Audit Commander User Guide Copyright 2009 Page 39 of 135

Page 40: Audit Commander User Guide

Chapter 3 – Audit Queries

compliance for a tested procedure, then stratified attribute sampling maybe appropriate. If not,

then unrestricted sampling will be better.

If the supporting documents for data being audited are contained in a central location, e.g. no

travel or other logistics are involved, then stop and go sampling may be a more efficient and

effective method for random sampling for the following reasons:

1. There is no need to compute a required sample size,

2. There is no need to perform a preliminary analysis of

the population attributes such as expected error

rate, and

3. There is little or no risk in "over sampling", i.e.

testing more samples than required and therefore

spending excess audit time doing the testing.

Stop and Go sampling is a statistically valid process which involves the following steps:

1. Assign a random number to each item in the population

(e.g. using "Mersenne Twister" or other statistically

valid random number generator)

2. Sort the population by assigned random number, either

ascending or descending

3. Select the first 10 - 20 items (auditor judgment as

to number), test them and put the results into an

Excel spreadsheet.

4. Run a "stop and go" sample report and review the

results (see example below)

5. If the resulting sample precision is too large, then

select another group of transactions by sorted

assigned random number (auditor judgment as to

number)

6. Test the samples and record the results in the same

Excel spreadsheet.

7. Run another "stop and go" sample an review the

results.

8. Repeat steps 5 through 7 until satisfactory results

have been obtained.

Page 41: Audit Commander User Guide

Chapter 3 – Audit QueriesThe report from the Stop and Go Sample will show the intermediate results, sample

statistics as well as calculate the estimate of the population at four confidence levels -

80%, 90%, 95% and 98%. The results will also be charted for easy review. The charts

show the upper and lower bounds, as well as the point estimate for each calculation.

Output is in three formats:

1. Electronic work paper (see example)

2. Chart (below)

3. Text report

An example of the chart output is shown below (attribute test for signature on

documents as tested in 25 samples):

Figure 14 – Attribute sampling

The chart above presents the results of the attribute sample test visually for four confidence

levels as follows:

Audit Commander User Guide Copyright 2009 Page 41 of 135

Page 42: Audit Commander User Guide

Chapter 3 – Audit Queries

1. 80% confidence the rate is between approximately .015 and .021

2. 90% confidence the rate is between approximately .014 and .022

3. 95% confidence the rate is between approximately .013 and .025

4. 98% confidence the rate is between approximately .0125 and .024

Note: As the confidence level increases, the bands widen.

Other information required (if any)Two data elements are required:

1. The name of the column which indicates if the attribute was

tested on that row, and

2. The name of the column which contains the results, i.e. has

an “X” if the attribute was identified or blank if it was

not.

Stop and Go Variable SamplingDescription / Use

Monetary amounts can be estimated using stratified sampling, especially if the population can be

divided into strata which have less variability. There are techniques for optimizing the selection of

sample size, such as Neyman's allocation method.

If the supporting documents for data being audited are contained in a central location, e.g. no

travel or other logistics are involved, then stop and go sampling may be a more efficient and

effective method for random sampling for the following reasons:

1. There is no need to compute a required sample size,

2. There is no need to perform a preliminary analysis of the population attributes such as

expected error rate, and

3. There is little or no risk in "over sampling", i.e. testing more samples than required and

therefore spending excess audit time doing the testing.

Stop and Go sampling is a statistically valid process which involves the following steps (but note

that it does not comply with the proposed SAS 39):

1. Assign a random number to each item in the population (e.g. using "Mersenne Twister"

or other statistically valid random number generator)

2. Sort the population by assigned random number, either ascending or descending

Page 43: Audit Commander User Guide

Chapter 3 – Audit Queries3. Assign a strata number to each transaction in the population (typically based upon a

numeric range of values).

4. Obtain a suggested sample allocation based upon Neyman's allocation (or other method

logy)

5. Select the first 10 - 20 items (auditor judgment as to number), test them and put the

results into an Excel spreadsheet.

6. Run a "stop and go" sample report and review the results (see example below)

7. If the resulting sample precision is too large, then select another group of transactions by

sorted assigned random number (auditor judgment as to number)

8. Test the samples and record the results in the same Excel spreadsheet.

9. Run another "stop and go" sample an review the results.

10. Repeat steps 5 through 7 until satisfactory results have been obtained.

The report from the Stop and Go Sample will show the intermediate results, sample statistics as

well as calculate the estimate of the population at four confidence levels - 80%, 90%, 95% and

98%. The results will also be charted for easy review. The charts show the upper and lower

bounds, as well as the point estimate for each calculation.

Output is in three formats:

1. Electronic work paper (see example)

2. Chart (below)

3. Text report

An example of the chart output is shown below (variable test of 25 samples):

Audit Commander User Guide Copyright 2009 Page 43 of 135

Page 44: Audit Commander User Guide

Chapter 3 – Audit Queries

Figure 15 – Variable sampling

The chart above presents the results of the variable sample test visually for four confidence

levels as follows:

1. 80% confidence the true population amount is between approximately $110,000 and

$218,000

2. 90% confidence the true population amount is between approximately $95,000 and

$230,000

3. 95% confidence the true population amount is between approximately $81,000 and

$241,000

4. 98% confidence the true population amount is between approximately $67,000 and

$259,000

Page 45: Audit Commander User Guide

Chapter 4– Electronic Work Papers

4 Electronic Work papers

4.1 Overview

The purpose of the electronic work papers module is to organize a set of audit steps and provide

a means to perform these audit steps on a repeatable basis, documenting the results in an

electronic work paper format.

4.2 Example usage

A file named “Query.ini” is provided with the installation. This file contains individual audit steps

for approximately ten audits. Selecting the module named “Electronic work papers” from the

main menu will enable running any or all of these program steps and producing the work papers

in electronic work paper format.

Note: The command file “Query.ini” assumes that the installation default directory has been selected. If not, it will be necessary to use a text editor such as WordPad to replace all the file names with the directory name where the software was installed.

The file names included assume that the test files reside in the default installation directory. If

not, the file Queri.ini will need to be edited (e.g. using WordPad) and specify a “replace all” with

the name of the location where the data being tested resides.

4.3 Benefits

The primary benefits include:

• “Repeatable” process, which reduces audit effort on audit engagements which perform

the same types of analysis

• Documented output produced automatically

• Reduced learning curve for the performance of certain audit procedures

When queries are made using the general query form, the procedural steps can be logged into a

command file. The advantages of doing so include the ability to:

Page 46: Audit Commander User Guide

Chapter 4 – Electronic work papers

• re-perform the steps at a future date

• adapt the audit procedures to other audits by changing the parameters

• share the procedural information between auditors

• assemble a "knowledge basis" for future auditsSuch audit steps are logged into an audit command file which may contain the procedures for

one or more audits. Each audit, in turn, will consist of one or more procedural steps. The starting

point for reviewing, changing or running these commands is to open the log file using the main

menu form shown below and select "Electronic work papers".

4.4 The basic form

The main form consists of two sections:

1. General information about the audit, and

2. Specific information about the audit procedure to be performed.

This information can be viewed, changed and the procedural steps can be run using the form.

The audit procedures can be performed one at a time, or all together in a single step. The results

for each processing step are written out in three formats:

1. As a work paper (in web page format for browsing with a browser), and

2. As a plain text file (which may be processed again as data), and

3. As a chart for visual review

Page 47: Audit Commander User Guide

Chapter 4– Electronic work papers

Figure 16 Electronic work papers main form

4.4.1 Using the electronic work papers form

Selecting the command file

The command file used for processing electronic work papers must be organized into a special

format. This command file is generally prepared as a result of running queries using the Query

form described in Chapter 3. However, it is also possible to construct the file using a text editor

such as Word Pad.Audit Commander User Guide Copyright 2009 Page 47 of 135

Page 48: Audit Commander User Guide

Chapter 4 – Electronic work papers

The command file contains information about the audit as well as detail processing procedures

for each step. This command file may consist of one or more audits, each of which is identified

by a unique identifier (“audit number”). The audit information will be further divided into a series

of audit steps to be performed.

There is an example of the contents of an electronic work paper command file contained in

Appendix B. A complete file is also included with the software installation.

The command file is selected using the “Cmd File” button in the upper left hand corner of the

form. Note that the command file must have an extension of “.ini” and is located using the

standard Windows “explorer” type menu.

4.4.2 Selecting the audit

Once an audit command file has been selected, any of the audits contained within the command

file can be selected for processing from the drop down list.

4.4.3 Selecting the audit steps to be run

When the audit has been selected, then a list of all available audit steps can be displayed using

the drop down list. If a particular audit step is needed, it can be selected from the list for

processing.

Note: If all the audit steps are to be run, then it is not necessary to select a particular step. Instead, the “RunAll” button should be selected.

4.5 Report Tab

The report tab displays the results of the last audit step performed. Note that the audit results

will be written to a total of four locations:

• An electronic work paper in HTML format,

• A plain text file

• Optionally, a chart

• The report tab of the form

Page 49: Audit Commander User Guide

Chapter 4– Electronic work papers

4.6 Defining the audit procedures

The audit procedures are defined as a series of entries contained within an audit step. Detail

examples of a set of audit commands are shown in Appendix A. The steps consist of a series of

rows of text, each of the format Parameter = Value where “Parameter” is one of ten possible text

values and “Value” is the specific details for the parameter specified.

As an example, suppose that for a particular audit step, the input data is contained in an Excel

work book named “c:\test\data\Audit6025\EWP.xls”. A line on the audit step section might read

as follows:

Infile = c:\test\data\Audit6025\EWP.xls

4.7 Running the commands

At the bottom of the form are seven click buttons which perform the following actions:

• Save – Saves any changes made on the form to reflect processing requirements going

forward or to incorporate any new or changed audit needs.

• Run – Runs the current audit procedure specified using the parameters shown on the

current page

• Prev – Moves back to the former audit step to display the audit procedure information

• Next – Advances to the next audit step to display the audit procedure information.

• Delete – Deletes the audit procedure information displayed for the current step. (Note

that this information can not be recovered without re-typing it in).

• Exit – Close the form and return to the main menu

• RunAll – Runs all the steps in the audit command file.

There are five major groups of commands:

1. Numeric

2. Date

3. Patterns

4. Sampling

5. Other

Audit Commander User Guide Copyright 2009 Page 49 of 135

Page 50: Audit Commander User Guide

Chapter 4 – Electronic work papers

Details on the commands within each group are shown below, as they are contained in an

example section of a query file. Each of these sections are organized into an audit or project

based upon the number assigned to the step. As previously mentioned, the commands may

either be run separately or as a group for all the steps in the audit.

Numeric CommandsPopulation Statistics

Round Numbers

Benford’s Law

Stratify

Summarize

Top 10

Bottom 10

Histogram

Box Plot

4.7.1 Date Commands

Holidays

Weekdays

Holiday Extract

Ageing

Date Near

Date Range

Week Day Report

4.7.2 OtherGaps

Extract

Duplicates

Same, Same, Different

Confidence Band

Invoice Near Miss

Split Invoices

Check SSN

Page 51: Audit Commander User Guide

Chapter 4– Electronic work papers

Check PO Box

Calculated Value

4.7.3 Patterns

Benford’s Law

Round Numbers

Stratify

Holidays

Week Days

Fuzzy Match

Fuzzy LD

4.7.4 SamplingStop N Go Variable

Stop N Go Attribute

Audit Commander User Guide Copyright 2009 Page 51 of 135

Page 52: Audit Commander User Guide

Chapter 4 – Electronic work papers

StatisticsPopulation Statistics

The statements below take the column named “Paid Amount” on the worksheet “Payroll”

and prepare a chart, a text report and a work paper in html format which shows debit,

credit and zero balances and counts.

[1023-2]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Foot salary payment amounts, and classify the

total by debit, credit and zero balances.

Command = stat

Table = Payroll$

Where =

Column = Paid Amount

Scheme = fall

Title = Salary payments at location ABC

Round Numbers

The statements below take the column named “Amount” on the worksheet “JE” and

extract those amounts which are round numbers of type 2,3 or 6 – e.g. $10, $100, and

$1,000,000.

[1015-15]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Prepare a schedule of round numbers of order 2, 3 and 6

round numbers in Journal entries

Command = rn

Table = je$

Where =

Column = amount

Parm1 = 0011001

Page 53: Audit Commander User Guide

Chapter 4– Electronic work papers

Benford’s Law

The statements below take the column named “cost” on the file named fa.txt in the

directory “c:\test\data” ” and prepare a test of Benford’s law for the first two digits. A chart

is prepared with a summer color theme and title “Asset Cost Amounts – Benford’s law’

[1089-27]

Select = OK

DataSource = c:\test\data\

Objective = Perform Benford's law testing on cost amounts

Command = benford

Table = fa#txt

Parm1 = F2

Column = cost

Scheme = summer

Title = Asset Cost amounts - Benford's law

Stratify

The statements below take the column named “amount paid” on the work sheet named

“PPTest” in the work book EWP.xls and stratify the data into the following “bins”:

0 – 100 , 100- 200, 200 – 500, 500 – 1,000, 1,000 – 2,000 and 2,000 – 3000. Amounts

above or below the extremes are classified separately. A chart is prepared using the “fall”

color theme

[1089-5]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Stratify invoices by amount paid

Command = stratify

Table = PPTest$

Where =

Column = amount paid

ColString =

Parm1 = 0 100 200 500 1000 2000 3000

Scheme = Fall

Title = Invoice Payments

Audit Commander User Guide Copyright 2009 Page 53 of 135

Page 54: Audit Commander User Guide

Chapter 4 – Electronic work papers

Summarize

The statements below summarize the column invoice amount by terms percent offered.

Data is in the Excel work book EWP.xls on the sheet PPTest

[1089-6]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Quantify posted invoices by terms percent offered

Command = summary

Table = PPTest$

Where =

Column = invoice amount

ColString = [terms percent]

Top 10

The statements below take the column named “cost” on the work sheet named “FA” in the

work book EWP.xls and list the 10 largest values in descending order

[1074-11]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Prepare a schedule of the ten largest asset costs, in

descending order

Command = topn

Table = fa$

Where =

Column = cost

Parm1 = 10

Page 55: Audit Commander User Guide

Chapter 4– Electronic work papers

Bottom 10

The statements below take the column named “cost” on the work sheet named “FA” in the

work book EWP.xls and list the 5 least values in ascending order

[1074-12]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Prepare a schedule of the five assets with the least

cost, in ascending order

Command = bottomn

Table = fa$

Where =

Column = cost

ColString =

Parm1 = 5

Histogram

The statements below take the column named “units” on the work sheet named “Inventory

Data” in the work book EWP.xls and prepare a histogram of the counts. Note that only

those rows where the unit cost exceeds 20 are analyzed. A chart is output with a fall color

scheme.

[1097-1]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Using a histogram, plot quantities of high value

inventory items (i.e. unit cost > $20)

Command = histo

Table = Inventory Data$

Where = [unit cost] > 20

Column = units

Scheme = Fall

Title = High Value inventory items

Audit Commander User Guide Copyright 2009 Page 55 of 135

Page 56: Audit Commander User Guide

Chapter 4 – Electronic work papers

Box Plot

The statements below take the column named “units” on the work sheet named “Inventory

Data” in the work book EWP.xls and prepare a box whisker chart which shows the ranges

as four quartiles. Note that only those rows where the unit cost exceeds 20 are analyzed.

A chart is output with a green color scheme.

[1097-3]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Using a boxplot, plot quantities of high value

inventory items (i.e. unit cost > $20)

Command = boxplot

Table = Inventory Data$

Where = [unit cost] > 20

Column = units

Scheme = Green

Title = High Value inventory items

Date Commands

Holiday Extract

The statements below take the date column named “inventory date” on the work sheet

named “Inventory Data” in the work book EWP.xls and extract those records where an

inventory was taken on a US holiday.

[1097-23]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Prepare a schedule of inventories performed on a

holiday

Command = holiday

Table = Inventory Data$

Where =

Column = inventory date

ColString =

Parm1 = mdy

Parm2 = US

Page 57: Audit Commander User Guide

Chapter 4– Electronic work papers

Weekdays

The statements below take the date column named “inventory date” on the work sheet

named “Inventory Data” in the work book EWP.xls and prepare a report and a chart

summarizing transactions on a holiday [1097-22]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Extract inventories taken on a Tuesday

Command = wd

Table = Inventory Data$

Where =

Column = inventory date

Parm1 = 0010000

Parm2 = US

Holidays

The statements below take the date column named “inventory date” on the work sheet

named “Inventory Data” in the work book EWP.xls and prepare a report and a chart

summarizing transactions on a holiday.

[1097-22]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Analyze dates inventories taken on holidays

Command = holidayReport

Table = Inventory Data$

Where =

Column = inventory date

ColString =

Parm1 = mdy

Parm2 = US

Scheme = spring

Title = Inventories taken on holidays

Audit Commander User Guide Copyright 2009 Page 57 of 135

Page 58: Audit Commander User Guide

Chapter 4 – Electronic work papers

Ageing

The statements below age the amount “invoice amount” based upon the date column

“invoice date”. Ageing is as of 3/31/2007. A chart is produced using a summer color

scheme (in addition to a text and html format report)

[1103-1]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Perform an overall ageing of invoices

Command = age

Table = Trans$

Where =

Column =

ColString = [invoice date],[invoice amount]

Parm1 = 3/31/2007

Parm2 = mdy

Scheme = summer

Title = Ageing of customer invoices

Date Near

The statements below extract those dates within 5 days of 7-31-2008, i.e. 7-26-2008

through August 5, 2008.Work sheet is named JE in the workbook named EWP.xls. Date

column tested is named “tran date”

[1015-18]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Extract transactions posted within 5 days of 7-31-2008

Command = datenear

Table = je$

Where =

Column = tran date

ColString =

Parm1 = 7-31-2008

Parm2 = 5

Page 59: Audit Commander User Guide

Chapter 4– Electronic work papers

Date Range

The statements below extract those dates between 11-1-2008 and 11-15-2008. Work

sheet is named ER in the workbook named EWP.xls. Date column tested is named

“Report date” Note that the same results could be obtained using the “extract´comand

and specifying criteria “[Report date] between #11-1-2008# and #11-15-2008#”

[1037-16]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Extract those transactions with dates between 11-1-2008

and 11-15-2008

Command = daterange

Table = ER$

Where =

Column = Report Date

ColString =

Parm1 = 11-1-2008

Parm2 = 11-15-2008

Week Day Report

The statements below prepare a chart and text report of the counts of sales by day of

week. Work sheet is named “Revenue Data” in the workbook named EWP.xls. Date

column tested is named “Sales date”

[1045-12]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Prepare a summary report of sales by day of week

Command = wdreport

Table = Revenue Data$

Where =

ColString = [sales date]

Parm1 = mdy

Parm2 =

Scheme = green

Title = Sales by Day of week

Audit Commander User Guide Copyright 2009 Page 59 of 135

Page 60: Audit Commander User Guide

Chapter 4 – Electronic work papers

Other

Gaps

The statements below prepare a chart and text report of the counts of sales by day of

week. Work sheet is named “Revenue Data” in the workbook named EWP.xls. Date

column tested is named “Sales date”

[1079-29]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.mdb

Objective = Check for numeric sequence gaps in tag numbers

Command = gap

Table = FA

Where =

Column =

ColString = tagno

Parm1 =

Parm2 = 1

Title =

Extract

The statements below extract all the rows from the table named “FA” where the time in

the column named “adate” is between the hours of 3 and 5, i.e. the time period from 3:00

a.m. through 5:59 a.m. Data source is an Access database named EWP.mdb.

[1079-38]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.mdb

Objective = Test for transactions made between 3 and 6 a.m.

Command = extractwhere

Table = FA

Where = hour(adate) between 3 and 5

Page 61: Audit Commander User Guide

Chapter 4– Electronic work papers

Duplicates

The statements below identify duplicate rows in a text file named fa.txt in the directory

c:\test\data. A duplicate is considered any two rows which have the identical column

vales for tango and location. In this instance a duplicate is determined based upon the

values in two columns. However, duplicates may be defined as two rows of data having

any one or more column values identical.

[1089-28]

Select = OK

DataSource = c:\test\data\

Objective = Test for duplicate tag numbers

Command = duplicates

Table = fa#txt

Where =

Column = tagno

ColString = location, tagno

Parm1 =

Parm2 = 2

Warning: In order to function properly, two conditions need to exist:

Warning: The first row in the data should have column names

Warning: A special file named “schema.ini” must reside in the directory and specify the details

about each text file in the directory.

Same, Same, Different

The statements below check for what is considered to be an unusual situation for invoice

payments – two (or more) rows with the same vendor number, same invoice number but a

different amount. The worksheet is PPTest in the workbook EWP.xls. All rows are tested.

[1089-20]

Select = OK

Audit Commander User Guide Copyright 2009 Page 61 of 135

Page 62: Audit Commander User Guide

Chapter 4 – Electronic work papers

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Check for unusual situation - same vendor, same invoice

number, different amount

Command = ssd

Table = PPTest$

Where =

Column =

ColString = [vendor number], [invoice number], [invoice amount]

Parm1 =

Parm2 = 3

Scheme =

Title =

Confidence Band

[to be developed]

Invoice Near Miss

The statements below check for what invoices that are very similar, but not exactly alike

The database table is “Duplicate Invoices” in the Access database EWP.mdb. All rows

are tested.

[1074-30]

Datasource = c:\test\data\EWP.mdb

Command = invne

FileOut = c:\test\cm\report\t-24.txt

Colstring = sColstring

Table = Duplicate Invoices

Parm1 = 30 ' date tolerance

Parm2 = 5 ' invoice number tolerance

Page 63: Audit Commander User Guide

Chapter 4– Electronic Work Papers

Split Invoices

The statements below check for split invoices. The database table is “Duplicate Invoices”

in the Access database EWP.mdb. All rows are tested.

[1074-31]

Datasource = c:\test\data\EWP.mdb

Command = invsp

FileOut = c:\test\cm\report\t-25.txt

Colstring = sColstring

Table = Duplicate Invoices

Parm1 = 30 ' date tolerance

Parm2 = 5 ' invoice number tolerance

Check SSN

The statements below check for invalid social security numbers. The table is “Empshort”

in the Access database EWP.mdb. All rows are tested.

[1074-33]

Datasource = c:\test\data\EWP.mdb

Command = ssn

FileOut = c:\test\cm\report\t-42a.txt

Colstring = sColstring

Table = EmpShort

Page 64: Audit Commander User Guide

Chapter 4 – Electronic work papers

Check PO Box

The statements below check for post office boxes in the address. The table is “Empshort”

in the Access database EWP.mdb. All rows are tested.

[1074-32]

Datasource = c:\test\data\EWP.mdb

Command = pobox

FileOut = c:\test\cm\report\t-32.txt

Colstring = sColstring

Table = EmpShort

Calculated Value

The statements below illustrate the use of the calc command to create an additional

column. In this case the column is the length of the PO number. This value will be used

in later audit tests. The table is “PPTest” in the Excel workbook EWP.xls. All rows are

tested.

[1089-31]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Determine the length of the Purchase order number

in each record

Command = calc

Table = PPTest$

Where =

Column = PO Number

ColString =

Parm1 = len([PO Number]) as [Purchase Order Number length]

Parm2 =

Patterns

Benford’s Law

Page 65: Audit Commander User Guide

Chapter 4– Electronic work papers

The statements below are used to perform a pattern test using Benford’s Law on each

vendor’s invoices. The table is “PPTest” in the Access database cmGen.mdb. All rows

are tested.

[1074-24]

Datasource = c:\test\cm\cmGen.mdb

Command = patternben

FileOut = c:\test\cm\report\t-26.txt

Colstring = [vendor number], [invoice amount]

Table = CMTest

Parm1 = F1

Round Numbers

The statements below are used to perform a pattern test using Round numbers on each

vendor’s invoices. The table is “CMTest” in the Access database cmGen.mdb. All rows

are tested.

[1074-27]

Datasource = c:\test\cm\cmGen.mdb

Command = patternrn

FileOut = c:\test\cm\report\t-29.txt

Colstring = [vendor number], [invoice amount]

Table = CMTest

Stratify

The statements below are used to perform a pattern test using data stratification on each

vendor’s invoices. The table is “CMTest” in the Access database cmGen.mdb. All rows

are tested.

[1074-28]

Datasource = c:\test\cm\cmGen.mdb

Command = patternstrat

FileOut = c:\test\cm\report\t-30.txt

Audit Commander User Guide Copyright 2009 Page 65 of 135

Page 66: Audit Commander User Guide

Chapter 4 – Electronic work papers

Colstring = [vendor number], [invoice amount]

Table = CMTest

Parm1 = -100 0 200 500 1000 5000 10000 20000

Holidays

The statements below are used to perform a pattern test using Federal holidays on each

vendor’s invoices. The table is “CMTest” in the Access database cmGen.mdb. All rows

are tested.

[1074-25]

Datasource = c:\test\cm\cmGen.mdb

Command = patternhol

FileOut = c:\test\cm\report\t-27.txt

Colstring = [location], [invoice date]

Table = CMTest

Parm1 = mdy

Parm2 = US

Week Days

The statements below are used to perform a pattern test using day of the week on each

vendor’s invoices. The table is “CMTest” in the Access database cmGen.mdb. All rows

are tested.

[1074-26]

Datasource = c:\test\cm\cmGen.mdb

Command = patternwd

FileOut = c:\test\cm\report\t-28.txt

Colstring = [location], [invoice date]

Table = CMTest

Fuzzy Match

The statements below are used to perform a fuzzy match for locations which match the

search text. The sheet is “FA” in the Excel workbook EWP.xls. All rows are tested.

Page 67: Audit Commander User Guide

Chapter 4– Electronic work papers

[1074-34]

Select =

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Identify any assets at location codes which start with

AB

Command = fuzzymatch

Table = fa$

Where =

Column = location

ColString =

Parm1 = AB?

Audit Commander User Guide Copyright 2009 Page 67 of 135

Page 68: Audit Commander User Guide

Chapter 4 – Electronic work papers

Fuzzy LD

The statements below are used to perform a fuzzy match for tag numbers using the

Levenshtein distance algorithm,. The sheet is “FA” in the Excel workbook EWP.xls. All

rows are tested

[1074-34]

Select =

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Identify any tag numbers similar to 1027

Command = fuzzyld

Table = fa$

Where =

Column = tagno

Parm1 = 1027

Parm2 = 2

Sampling

Stop N Go Variable

The statements below are used to perform a stop and go variable sample assessment for

worksheet SV4 in the workbook EWP.xls. All rows are tested.

[1173-3]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Perform a stop and go variable sample for invoice

totals (30 samples)

Command = stopgov

Table = SV4$

Where =

Column =

ColString = [sampled], [audited value]

Parm1 =

Parm2 =

Scheme = Blue

Page 69: Audit Commander User Guide

Chapter 4– Electronic work papers

Title = Stop and Go Sampling 30 items

Stop N Go Attribute

The statements below are used to perform a stop and go attribute sample assessment for

worksheet SV4 in the workbook EWP.xls. All rows are tested.

[1173-4]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Perform a stop and go attribute sample for

"signature" (sample size 10)

Command = stopgoa

Table = Sample Attribute$

Where =

Column =

ColString = [sampled], [signature]

Parm1 =

Parm2 =

Scheme = Spring

Title = Stop and Go Sampling 10 items - Signature

Stratified Variable Assessment

The statements below are used to perform a stratified variable sample assessment for

table Neyman in the Access database cmGen.mdb. A 95% confidence level is used. All

rows are tested.

[1074-21]

Datasource = c:\test\cm\cmGen.mdb

Command = svacc

FileOut = c:\test\cm\report\t-33.txt

Colstring = sColstring

Column = stratum

Table = Neyman

Audit Commander User Guide Copyright 2009 Page 69 of 135

Page 70: Audit Commander User Guide

Chapter 4 – Electronic work papers

Parm1 = 45

Parm2 = .95

Page 71: Audit Commander User Guide

Chapter 4– Electronic work papers

Stratified Variable Population

The statements below are used to provided a stratified variable sample report for table

Neyman in the Access database cmGen.mdb. A 95% confidence level is used. All rows

are tested.

[1074-20]

Datasource = c:\test\cm\cmGen.mdb

Command = svpop

FileOut = c:\test\cm\report\t-32.txt

Colstring = sColstring

Column = stratum

Table = Neyman

Parm1 = 35

Parm2 = .95

Stratified Attribute Assessment

The statements below are used to provided a stratified variable assessment report for

table Neyman in the Access database cmGen.mdb. A 95% confidence level is used. All

rows are tested.

[1074-23]

Datasource = c:\test\cm\cmGen.mdb

Command = saacc

FileOut = c:\test\cm\report\t-35.txt

Colstring = sColstring

Column = stratum

Table = Attrib

Parm2 = .95

Audit Commander User Guide Copyright 2009 Page 71 of 135

Page 72: Audit Commander User Guide

Chapter 4 – Electronic work papers

Stratified Attribute Population

The statements below are used to provided a stratified attribute sample report for table

Attrib in the Access database cmGen.mdb. A 95% confidence level is used. All rows are

tested.

[1074-22]

Datasource = c:\test\cm\cmGen.mdb

Command = sapop

FileOut = c:\test\cm\report\t-34.txt

Colstring = sColstring

Column = stratum

Table = Attrib

Parm2 = .95

Page 73: Audit Commander User Guide

Chapter 6 Macros

5 Monitoring

5.1 Overview

The term "continuous monitoring" means different things to different auditors.

In Wikipedia, continuous monitoring is defined as:

"Continuous monitoring is the process and technology used to detect compliance and risk

issues associated with an organizations financial and operational environment."

Wikipedia describes some of the benefits as:

"Continuous monitoring systems can examine 100% of transactions and data processed in

different applications and databases. The continuous monitoring systems can test for

inconsistencies, duplication, errors, policy violations, missing approvals, incomplete data, dollar

or volume limit errors, or other possible breakdowns in internal controls. Testing can be done

tests for processes like payroll, sales order processing, purchasing and payables processing

including travel and entertainment expenses and purchasing cards, and inventory transactions."

The process of establishing a continuous monitoring system with Audit Commander consists of

the following steps:

• Develop various control tests using the "ad hoc" (general) query facility, logging the

desired commands to a log file

• Organize the ad hoc queries into audits or projects within a log file

• Plan a schedule for regular testing of controls, using the defined audits or projects which

have been established

• Implement a schedule for running these control tests

• Review the output of the processes and revise/expand the audit procedures accordingly.

Note: The recommended procedure is to perform testing on a 100% basis (rather than sample). Because the procedures can be run on an automated basis during non-peak hours (evenings and weekends) it becomes feasible to run a variety of audit tests, even when transaction volumes are large.

Page 74: Audit Commander User Guide

Chapter 5 - Monitoring

5.1.1

5.2 Example usage

5.3 Benefits

5.3.1

5.4 The basic form

The monitoring form consists of two tabs. The first tab is used to locate the file with the

monitoring commands and select the specific monitoring process to be performed. The second

tab contains information regarding the specific processing to be performed. At the bottom of the

form are the various command buttons used to run the commands, view the output chart and

navigate between monitoring commands.

Page 75: Audit Commander User Guide

Chapter 5 Monitoring

Figure 17 Monitoring form

Audit Commander User Guide Copyright 2009 Page 75 of 135

Page 76: Audit Commander User Guide

Chapter 5 - Monitoring

5.5 Charts

5.5.1 The elements of charts

Charts produced by the monitoring procedure consist of three elements. Some of the elements

are optional for certain procedures. The three elements are:

1. The chart graphic shown at the top2. A text area which may contain additional explanatory information3. A meter which graphically charts expected versus actual and may classify the character

of the results.

5.5.2 Chart graphic

Major aspects of the chart are specified using a list of short parameters in a text file with lines of

the format “Object = Value” where object refers to the specific attribute of the chart and value is

the desired setting for the value. As an example, one line could be “Title = Fixed Assets”. This

causes the title shown on the chart to be set to “Fixed Assets”. The names of the objects are not

case sensitive, but must be spelled as indicated below. Each object will contain an example and

a description as to how to specify the values.

5.5.3 Chartfile

Chartfile = filename

The name of the chart file to be producedChartFile = "c:\test\cm\ReportMon\t-1.png"

5.5.4 Title

Title = title content

The title to be shown on the chart

Title = "Fixed Assets - Cost and Depreciation by Useful Life"

5.5.5 BGColorBGColor = dark green

The background color around all the chart elements

BGColor = "dark green", or

Page 77: Audit Commander User Guide

Chapter 5 MonitoringBGColor = &H669966

5.5.6 ChartwidthChartwidth = 600

The width of the chart (in pixels)ChartWidth = 600

5.5.7 ChartheightChartheight = 540

The height of the chart (in pixels)

ChartHeight = 540

5.5.8 DataChartColor

DataChartColor = blanched almond

The color to be used for the data chart

5.5.9 YLabel

YLabel = Annual sales ($Thousands)

The label to be used for the vertical axis

5.5.10 ChartPosPct

ChartPosPct = .1

The positioning of the chart on the left, expressed as a percentage

5.5.11 Legend1

Legend1 = Cost

For comparative charts, the legend used for the first data element

5.5.12 Legend2

Audit Commander User Guide Copyright 2009 Page 77 of 135

Page 78: Audit Commander User Guide

Chapter 5 - Monitoring

Legend2 = Count

For comparative charts, the legend used for the second data element

5.5.13 CType

Ctype = “mb”

The chart type, a critical specification. This parameter specified the type of chart which will be

produced, which may be one of the following:

• mb – multibar (comparative)

• sb – single bar

• cband – linear regression with confidence and precision intervals

• trend – linear regression (no confidence or precision intervals)

5.5.14 Barcolor1

Barcolor1 = light yellow

For alternating horizontal bars, the colors to be shown for alternating bars (total of two colors)

5.5.15 Barcolor2

Barcolor2 = light yellow

For alternating horizontal bars, the colors to be shown for alternating bars (total of two colors)

5.5.16 Metertext

MeterText = "Fixed asset life groups"

For charts which have meters, the text to be shown on the meter which describes the type of

measurement being made

5.5.17 MeterPointerColor

MeterPointerColor = brown

The color used for the pointer on the meter to indicate the value obtained

Page 79: Audit Commander User Guide

Chapter 5 Monitoring

5.5.18 SetZone1

SetZone1 = 50, 100, light green, "Good"

The meter is divided into three zones. The setzone1 command is used to define the range of

values which fall into zone 1, the color for the zone and the description for the zone. In this

example, a range from 50 to 100 is considered good and is colored light green. The values

specified must be separated by commas.

5.5.19 SetZone2

SetZone2 = 20, 50, light yellow, "Adequate"

The setzone2 command is used to define the range of values which fall into zone 2, the color for

the zone and the description for the zone. In this example, a range from 20 to 50 is considered

adequate and is colored light yellow. The values specified must be separated by commas. Note

that the colors, descriptions and ranges are all entirely under the auditor’s control.

5.5.20 SetZone3

SetZone2 = 0, 20, pink, "Poor"

The setzone3 command is used to define the range of values which fall into zone 3, the color for

the zone and the description for the zone. In this example, a range from 0 to 20 is considered

poor and is colored pink. The values specified must be separated by commas. Note that the

colors, descriptions and ranges are all entirely under the auditor’s control.

5.5.21 Infile

Infile = "c:\program files\ezs\ac\data\EWP.xls"For certain charts, the data is obtained directly from a file, which may either be in Excel or Access format. This parameter allows the auditor specify the name of the file where the data to be charted is located.

5.5.22 Outfile

Outfile = "c:\test\cm\ReportMon\t-1.txt"Audit Commander User Guide Copyright 2009 Page 79 of 135

Page 80: Audit Commander User Guide

Chapter 5 - Monitoring

For certain charts, the data is obtained directly from a file, which may either be in Excel or Access format. This parameter allows the auditor specify the name of the file where the data to be charted is located.

5.5.23 SQL

SQL = "Select life, sum(cost) as cst, sum(ad) as accum from [FA$] where life < 20 group by life order by life;"For certain charts, the data is obtained directly from a file, which may either be in Excel or Access format. This parameter allows the auditor specify the name of the file where the data to be charted is located.

5.5.24 Text graphic5.5.25 TextBoxColor

TextBoxColor = light green

The color to be used for the text chart

TextBoxColor = "light green"

ChartBoxColor = "light green"

5.5.26 Meter graphic

5.6 Specifying how the graphics are prepared

5.6.1 Processing parametersQuery procedure

SQL

5.7 Command details tab

Setting Up the monitor procedures

Running the procedures

Page 81: Audit Commander User Guide

Chapter 5 Monitoring5.8 Types of Monitoring

5.8.1 RegressionMany expense (and other) items have a linear relationship, i.e. as one increases in amount, so

does the other. A simple example is payroll taxes. Generally, as the number of employees

increases, so too does the amount of payroll taxes. Note that it may not be possible to compute

an exact predicted value, but the auditor is aware that there should be a linear relationship.

With statistical calculations, it is possible to perform a regression analysis which will indicate

several things of interest to the auditor:

1. Is there, in fact, a linear relationship and if so how good (strong) is it (correlation)?,

2. With a confidence level (e.g. 95%) what is the band that the data points should fall within (confidence interval)?

3. If a new data point is to be charted, what range would these points fall within (prediction interval)

What is being monitored (indicator) - in this example, payroll tax expense is being mon-

itored

Expected values/ Results - the auditor expects that there will be a linear relationship

and most values will fall within the confidence interval

Control Limits - Set at 95% confidence for this example

Use for indicator - Unusual data points will be investigated. If no unusual data points

are identified, audit testing will be reduced.

Target (optimal) - More than 95% of the data points fall within the confidence interval.

No data points fall outside the prediction interval.

Historical Ranges - Historically there has been a very good fit in this area.

As the number of miles a school bus is driven increases, so too do the maintenance costs. The

chart below is for a hypothetical situation which plots the number of miles a fleet was driven

versus the amount of maintenance expense incurred. The test was performed using a 95%

confidence level (which can be varied). Visually, there appears to be a fairly strong correlation

between mileage and maintenance expense. However, there is one data point that is well above

the amount that would be expected. Audit Commander User Guide Copyright 2009 Page 81 of 135

Page 82: Audit Commander User Guide

Chapter 5 - Monitoring

Figure 18 – Regression chart

The correlation between the data points is poor (57%), largely due to the one

exceptional outlier. The next page shows the parameters used to develop the

analysis and the chart. The monitor process also outputs two text reports:

A log of the data analyzed

A report which contains all the regression detail information.

Page 83: Audit Commander User Guide

Chapter 5 Monitoring

5.8.2 Trend LineMany expense (and other) items have a linear relationship, i.e. as one increases in

amount, so does the other. A simple example is payroll taxes. Generally, as the

number of employees increases, so too does the amount of payroll taxes. Note that

it may not be possible to compute an exact predicted value, but the auditor is aware

that there should be a linear relationship.

With statistical calculations, it is possible to perform a regression analysis which will

indicate several things of interest to the auditor:

Is there, in fact, a linear relationship and if so how good (strong) is it (correlation)?,

With a confidence level (e.g. 95%) what is the band that the data points should fall

within (confidence interval)?

If a new data point is to be charted, what range would these points fall within

(prediction interval)

What is being monitored (indicator) - in this example, payroll tax expense is being

monitored

Expected values/ Results - the auditor expects that there will be a linear relationship

and most values will fall within the confidence interval

Control Limits - Set at 95% confidence for this example

Use for indicator - Unusual data points will be investigated. If no unusual data points

are identified, audit testing will be reduced.

Target (optimal) - More than 95% of the data points fall within the confidence

interval. No data points fall outside the prediction interval.

Historical Ranges - Historically there has been a very good fit in this area.

When the data is plotted, the chart below is obtained. For example, the amount of

maintenance expense for school buses is closely related to the number of miles

driven. Note that there are other factors as well, but generally, as the number of

miles driven increases, so too does the amount of maintenance expense. The chart

below confirms the general trend. This general trend is indicated as the correlation is

fairly good (89% in this case).

Audit Commander User Guide Copyright 2009 Page 83 of 135

Page 84: Audit Commander User Guide

Chapter 5 - Monitoring

The charting process also creates a log of the data charted.

If other information regarding the regression analysis is needed, for example

confidence and prediction intervals, that information can be obtained using the

confidence band method. Figure 19 – Trend Line

5.8.3 Pareto ChartsThe Pareto principle can often be applied to accounting data using the "80/20" principle.

Examples include:

Page 85: Audit Commander User Guide

Chapter 5 Monitoring1. 80% of the invoice value comes from 20% of the suppliers,

2. 80% of the general journal posting amounts come from 20% of the entries

3. 80% of the inventory value arises from 20% of the inventory items, etc. With this information, the auditor is able to focus on just those transactions which have the most

financial impact.

What is being monitored (indicator) - in this example, the auditor wishes to identify which

counties school bus maintenance expenses comprise the majority of all school maintenance

expenses state-wide.

Expected values/ Results - the auditor expects that just a few counties will comprise 80% of

the school bus maintenance costs state-wide.

Control Limits - In this case, 80% is being used.

Use for indicator - To narrow the focus for audit tests and analysis.

Target (optimal) - 20% or fewer of the items constitute 80% (or more) of the value.

Historical Ranges - Historically 15% of the counties have represented 85% of the school bus

maintenance costs.

When the data is plotted, the chart below is obtained. The chart indicates that just three counties

(Wake, Mecklenberg and New Hanover) combined have 80% of the state-wide costs for school

bus maintenance costs (note that this data is made up for illustration only).

Audit Commander User Guide Copyright 2009 Page 85 of 135

Page 86: Audit Commander User Guide

Chapter 5 - Monitoring

Figure20 – Pareto Chart

So if the audit focus were on school bus maintenance costs, the auditor could cover 80% of the

costs by looking at the costs incurred in only three counties.

Note the last category on the right ("All Other"). This is a sum of all the remaining counties not

shown and is computed by the system.

5.8.4 CountsTransaction counts may be monitored for a variety of reasons . Examples include:

Assuring that error counts are within tolerable limits ,

Performing reasonableness tests for counts

Determining that transaction counts are within historical ranges.

Page 87: Audit Commander User Guide

Chapter 5 MonitoringWith this information, the auditor is able to focus on just error or unusual

transactions.

What is being monitored (indicator) - in this example, the count of payroll

transactions quarterly is being monitored.

Expected values/ Results - the auditor expects that transaction counts will be within

historical ranges.

Control Limits - In this case, 0 - 60,000 is considered good, 60,000 - 100,000

unusual and over 100,000 is considered to be an error.

Use for indicator - To identify spikes or an unusually low number of transactions

Target (optimal) - In this example, transaction counts between 0 and 60,000 are

considered normal.

Historical Ranges - Historically transaction counts have varied from 0 to 60,000.

When the data is plotted, the chart below is obtained. The chart indicates that the

monitored counts are 59,298 which is within the monitoring range specified. In this

instance the count is for the number of payroll transactions during the quarter.

Counts up to 68,000 are considered normal. Counts between 68,000 and 100,000

indicate that review may be needed. Counts over 100,000 are considered an error

condition.

Audit Commander User Guide Copyright 2009 Page 87 of 135

Page 88: Audit Commander User Guide

Chapter 5 - Monitoring

Figure 21 – Meter chart with counts

5.8.5 AmountsTransaction amounts may be monitored for a variety of reasons . Examples include:

Assuring that amounts are within tolerable limits ,

Performing reasonableness tests for amounts

Page 89: Audit Commander User Guide

Chapter 5 MonitoringDetermining that transaction amounts are within historical ranges.

With this information, the auditor is able to focus on just error or unusual

transactions.

What is being monitored (indicator) - in this example, the amount of payroll

transactions quarterly is being monitored.

Expected values/ Results - the auditor expects that transaction amounts will be

within historical ranges.

Control Limits - In this case, 0 - 60,000 is considered good, 60,000 - 100,000

unusual and over 100,000 is considered to be an error.

Use for indicator - To identify spikes or an unusually low number of transactions

Target (optimal) - In this example, transaction counts between 0 and 60,000 are

considered normal.

Historical Ranges - Historically transaction counts have varied from 0 to 60,000.

When the data is plotted, the chart below is obtained. The chart indicates that the

monitored amounts are 23,902,899.64 which is within the monitoring range

specified. In this instance the amount is for the utility expense during the quarter.

Amounts up to $28 million are considered normal. Amounts between $28 and $40

million indicate that review may be needed. Amounts over $40 million are

considered to be an error indicator.

Audit Commander User Guide Copyright 2009 Page 89 of 135

Page 90: Audit Commander User Guide

Chapter 5 - Monitoring

Figure 22 – Meter chart with totals

5.8.6 Positive/Negative

Transaction amounts may be monitored for a variety of reasons . Examples include:

• Assuring that amounts are within tolerable limits ,

• Performing reasonableness tests for amounts

• Determining that transaction amounts are within historical ranges.

Page 91: Audit Commander User Guide

Chapter 5 MonitoringWith this information, the auditor is able to focus on just error or unusual transactions. The chart

below indicates the results of monitoring the amounts of fixed assets on the books. Negative or

zero amounts are indicative of possible error transactions, as assets can not be negative. In this

instance the net amount of fixed assets is a little over $18 million.

Figure 23 – Chart with counts and amounts

5.8.7 DuplicatesSometimes it is desirable to monitor counts of transactions which meet certain

(auditor specified) criteria. Examples include:

Error conditions such as "impossible" transactions

Potential duplicate transactions Audit Commander User Guide Copyright 2009 Page 91 of 135

Page 92: Audit Commander User Guide

Chapter 5 - Monitoring

Counts of transactions falling on a holiday

Counts of transactions falling within certain ranges or on specified days of the week

(e.g. weekends)

Other transactions which may serve as indicators of an error conditions

With this information, the auditor is able to focus on unusual or exceptional

conditions.

What is being monitored (indicator) - in this example, the count of potential duplicate

invoices

Expected values/ Results - the auditor knows that there are some apparently

duplicate transactions, but expects that the overall number will be low.

Control Limits - In this case, 0 - 10 is considered acceptable, 11 - 15 raises a caution

flag and numbers over 15 indicate an error condition. (Note that all these numbers

would be specified using auditor judgment).

Use for indicator - To identify possible processing errors in the payables system

Target (optimal) - In this example, a zero count would be the best that can be

achieved.

Historical Ranges - Historically transaction counts have varied from 0 to 150 (150

resulted from a computer processing glitch)

The chart below indicates the results of monitoring the counts of potential duplicate

payments. A total of 34 transactions were identified where a potential duplicate

payment may exist. This number exceeds the auditor's threshold, and therefore the

meter indicates the results as falling in the "red" zone. (Note that the colors of the

zones can be specified by the auditor).

Page 93: Audit Commander User Guide

Chapter 5 Monitoring

Figure 24 – Monitoring for duplicates

Note that the analysis process also results in the details of the potential duplicate

transactions written out to a file in text format which can then be imported into Excel

for further analysis and investigation.

5.8.8 QuartilesThe data classification of quartiles expands on the commonly used audit technique

of looking at the minimum, maximum and average values. Quartiles simply split up

the population into four "chunks", each of which has the same count. This provides

the auditor with a visual representation of the population.

Audit Commander User Guide Copyright 2009 Page 93 of 135

Page 94: Audit Commander User Guide

Chapter 5 - Monitoring

Sometimes it is desirable to classify transaction amounts by quartile. This can be

done for just those transactions which meet certain (auditor specified) criteria.

Examples include:

• Entire populations of transactions being tested to check for reasonableness

• Subsets of the population, e.g. just one location or region

• Debit or credit amounts only

• Other transactions which may be of interest

The chart below indicates the results of monitoring the ranges of asset costs and

accumulated depreciation. The range of cost is shown on the left and the range of

accumulated depreciation is shown on the right. Note that the data file being tested

contains fixed asset records with negative costs (an obvious error) - so the chart

looks unusual. There do not appear to be obvious errors for the accumulated

depreciation amounts.

Page 95: Audit Commander User Guide

Chapter 5 Monitoring

Figure 25 – Chart with quartiles

5.8.9 Simple Bar Charts

Often, a simple bar chart can be used to help visualize transactions or other data.

Examples include transaction amounts or counts over a time period, summaries or

counts by location, etc.

Preparing these charts for data being tested is a fairly simple process. The starting

point is the identification of two items:

1. The identifier for the data being charted. This can be a point in time, vendor

number, store location, etc.

2. The numeric amount to be charted. This could be either a count or a total. Audit Commander User Guide Copyright 2009 Page 95 of 135

Page 96: Audit Commander User Guide

Chapter 5 - Monitoring

With this information, the auditor is able to focus on unusual or exceptional

conditions.

What is being monitored (indicator) - in this example, the dollar amounts of asset

cost are being shown and classified as to their useful life.

Expected values/ Results - the auditor expects that the costs for assets with a

longer useful life will be greater than those with a shorter life, due to their nature.

Control Limits - In this case, there are no control limits defined.

Use for indicator - To assist in the planning of a fixed assets audit

Target (optimal) - There is no target in this example

Historical Ranges - Historically the total costs for assets with a longer useful life

has been significantly larger than the total for those with a shorter useful life. The

chart below classifies asset totals by their useful life. A few things appear odd:

• There are assets with a useful life of less than two years (error condition), and

• There seems to be an arbitrary cutoff at 12 years for asset useful lives, and

• The totals for each period of useful life are generally very similar, which would

not generally be expected.

Page 97: Audit Commander User Guide

Chapter 5 Monitoring

Figure 26 – Simple bar chart

Audit Commander User Guide Copyright 2009 Page 97 of 135

Page 98: Audit Commander User Guide

Chapter 6 Macros

6 Macros

6.1 Overview

Macros are a little used and often misunderstood facility that can be of significant value to the

auditor. Although some technical knowledge is required, the use of “canned” audit queries is a

relatively simple process.

6.2 Benefits

Macros provide a concise and quick way for the auditor to perform an analysis without using

forms. The primary benefits are a repeatable process, reduced time to use (once the process is

understood) and a facility to document the procedures performed.

The primary disadvantages are that macros are somewhat error prone due to misspelled file

names, misspelled commands, etc.

6.3 Setting up the macros

Setting up macros in Excel is done using the visual basic editor and then typing in (or pasting)

the macro code. In addition to setting up the macro, there is a one time procedure to provide a

“reference” to the Audit Commander DLL (file name EWP.dll, DLL name – EWP – Electronic

work papers). The reference will show during the process to establish a reference.

6.4 The EWM Class

The EWP.dll includes a class named cEWM which is used throughout for running the various

types of macros described here.

6.5 “Registering” the Dll

Registering the DLL is doe through the visual basic editor, selecting Tools | References and then

placing a check mark by the reference of interest. A screen shot is shown below.

Page 99: Audit Commander User Guide

Chapter 6 Macros

Figure 27 – Registering the DLL

6.6 Running the macros

6.6.1 Macros can be run using a variety of means:

From within the visual basic editor toolbar

From the visual basic menu (“run”)

From an Excel visual basic form by calling a routine (function or subroutine) which invokes the

macro

By the use of a shortcut key which has been established

6.7 Error Handling

For reasons of brevity, the examples below do not include error checking. It is recommended

that if, upon running the macro, the class “Errno” property is not zero, then the error description

(ErrDescription) be displayed or logged.

Audit Commander User Guide Copyright 2009 Page 99 of 135

Page 100: Audit Commander User Guide

Chapter 6 - Macros

6.8 Types of commands

Altogether there are 29 audit commands which may be invoked using macros. The commands

may u=include up to a maximum of ten parameters, each of which corresponds with those

shown on the query forms.

The key data elements which are include in almost every macro include the following:

• FileIn – the file name of the workbook, Access database or text file directory being ana-lyzed

• Cmd – the name of the audit command• Fileout – where the data report is to be written• LocalCol – the name of the single column being analyzed• ColString – certain commands require more than once column name for processing.

The Colstring will include two or more column names separated by commas• Table – the name of the work sheet, Access table or filename in the directory being

tested

There are other parameters as well which are occasionally used – Parm1, Parm2, Title and

Scheme

Page 101: Audit Commander User Guide

Chapter 6 Macros

6.8.1 Numeric6.8.1.1 Population StatisticsMacro parameters

6.8.1.1.1 Example macro

The following macro provides population statistics for the column named “invoice

amount” on the work sheet “CMTest” in the work book specified. A chart is prepared

using a light green color scheme.

Dim oEWM as new cEWM Dim sMsg As String oEWM.FileIn = "c:\test\cm\cmGen.xls" oEWM.ChartFile = "c:\test\cm\report\t-1.png" oEWM.Cmd = "stat" oEWM.FileOut = "c:\test\cm\report\t-1.txt" oEWM.LocalCol = "Invoice Amount" oEWM.Scheme = "lightgreen" oEWM.Title = "test cm - stat" oEWM.Table = "CMTest$" oEWM.Where = "[invoice amount] > 0 " oEWM.RunCmd

Audit Commander User Guide Copyright 2009 Page 101 of 135

Page 102: Audit Commander User Guide

Chapter 6 - Macros

6.8.1.2 Benford’s LawMacro parameters

Example macro

The following macro applies Benford’s Law to the column “Invoice Amount” on the

worksheet named “CMTest” for those value greater than zero. A chart of the

results is output with a light green color scheme.

Dim oEWM As New cEWM Dim sMsg As String oEWM.FileIn = "c:\test\cm\cmGen.xls" oEWM.ChartFile = "c:\test\cm\report\t-2.png" oEWM.Cmd = "ben" oEWM.FileOut = "c:\test\cm\report\t-2.txt" oEWM.LocalCol = "Invoice Amount" oEWM.Scheme = "lightgreen" oEWM.Title = "test cm - ben" oEWM.Table = "CMTest$" oEWM.Where = "[invoice amount] > 0 " oEWM.Parm1 = "F1" oEWM.RunCmd

Page 103: Audit Commander User Guide

Chapter 6 MacrosTop and Bottom 10

6.8.1.2.1 Macro parameters

The following macro identifies the ten smallest values for the column “Invoice Amount” on the

sheet named CMTest where the invoice amount is between $1,100 and $1,200.

6.8.1.2.2 Example macro

Dim oEWM As New cEWM

Dim sMsg As String

Dim sColstring As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.Cmd = "bottomn" ‘ for topn command is topn

oEWM.FileOut = "c:\test\cm\report\t-20.txt"

oEWM.LocalCol = "invoice amount"

oEWM.Table = "CMTest$"

oEWM.Where = "[invoice amount] between 1100 and 1200 "

oEWM.Parm1 = "7"

oEWM.RunCmd

Audit Commander User Guide Copyright 2009 Page 103 of 135

Page 104: Audit Commander User Guide

Chapter 6 - Macros

6.8.1.3 Box Plot

Macro parameters

The following macro provides a box plot chart (i.e. four quartiles) for data in the Excel workbook

sheet named “CMTest” where the invoice amount is greater than -$5,000. A chart is prepared

using a pink background.

Example macro Dim oEWM As New cEWM

Dim sMsg As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.ChartFile = "c:\test\cm\report\t-5.png"

oEWM.Cmd = "boxplot"

oEWM.FileOut = "c:\test\cm\report\t-5.txt"

oEWM.LocalCol = "Invoice Amount"

oEWM.Scheme = "pink"

oEWM.Title = "test cm - histogram"

oEWM.Table = "CMTest$"

oEWM.Where = "[invoice amount] > -5000 "

oEWM.RunCmd

6.8.1.4 Round NumbersMacro parameters

Example macro

The following macro produces a round number report on the amount “Invoice Amount” from the

worksheet “CMTest” in the workbook cmgen.xls. Only those invoice amounts greater than a

credit amount of $5,000 are tested. The output chart uses a pink theme with a title “test cm –

rnreport”. A text report is also output to a file named t-10.txt.

Dim oEWM As New cEWM

Dim sMsg As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.ChartFile = "c:\test\cm\report\t-10.png"

oEWM.Cmd = "rnreport"

oEWM.FileOut = "c:\test\cm\report\t-10.txt"

oEWM.LocalCol = "Invoice Amount"

oEWM.Scheme = "pink"

oEWM.Title = "test cm - rnreport"

oEWM.Table = "CMTest$"

oEWM.Where = "[invoice amount] > -5000 "

oEWM.RunCmd

Page 105: Audit Commander User Guide

Chapter 6 Macros

6.8.1.4.1 ‘Round number extract

The macro below extracts those rows from the sheet named CMTest in the column “Invoice

Amount” where the invoice amount is greater than -$5,000 and the amount is a round number of

order 1,2 or 3 (e.g. $10, $100, $1,000, but not $10,000 or $100,000 or any number which is not

round).

Dim oEWM As New cEWM

Dim sMsg As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

'oEWM.ChartFile = "c:\test\cm\report\t-11.png"

oEWM.Cmd = "rn"

oEWM.FileOut = "c:\test\cm\report\t-11.txt"

oEWM.LocalCol = "Invoice Amount"

oEWM.Scheme = "pink"

oEWM.Title = "test cm - rnreport"

oEWM.Table = "CMTest$"

oEWM.Where = "[invoice amount] > -5000 "

oEWM.Parm1 = "0111000"

oEWM.RunCmd

Audit Commander User Guide Copyright 2009 Page 105 of 135

Page 106: Audit Commander User Guide

Chapter 6 - Macros

6.8.1.5 HistogramsMacro parameters

The macro below obtains histogram data from the column “Invoice Amount” on the sheet named

“CMTest” where the invoice amount is greater than -$5,000. A chart of the results is output with

a light green format. A text report is written to the file named t-4.txt.

6.8.1.5.1 Example macro

Dim oEWM As New cEWM

Dim sMsg As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.ChartFile = "c:\test\cm\report\t-4.png"

oEWM.Cmd = "histo"

oEWM.FileOut = "c:\test\cm\report\t-4.txt"

oEWM.LocalCol = "Invoice Amount"

oEWM.Scheme = "lightgreen"

oEWM.Title = "test cm - histogram"

oEWM.Table = "CMTest$"

oEWM.Where = "[invoice amount] > -5000 "

oEWM.RunCmd

6.8.1.6 Gaps in SequencesMacro parameters

Example macro

The following macro produces a report of gaps in the numeric amount “Invoice Number” for the

worksheet named “CMTest” in the workbook “cmGen.xls”. A report is written as a text file to t-

18.txt.

Dim oEWM As New cEWM

Dim sMsg As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.Cmd = "gap"

oEWM.FileOut = "c:\test\cm\report\t-18.txt"

oEWM.Colstring = "[Invoice Number]"

oEWM.Table = "CMTest$"

oEWM.RunCmd

Page 107: Audit Commander User Guide

Chapter 6 Macros6.8.1.7 StratificationMacro parameters

Example macro

The following macro stratifies invoice amount data from the worksheet “CMTest” in the

workbook cmgen.xls. Only those invoice amounts greater than a credit amount of $5,000 are

tested. The output chart uses a light green theme with a title “test cm – stratify”. A text report is

also output to a file named t-3.txt. The stratification bins range from -100 through 3,000. Note

that invoice amounts both above and below these amounts will be separately classified.

Dim oEWM As New cEWM

Dim sMsg As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.ChartFile = "c:\test\cm\report\t-3.png"

oEWM.Cmd = "stratify"

oEWM.FileOut = "c:\test\cm\report\t-3.txt"

oEWM.LocalCol = "Invoice Amount"

oEWM.Scheme = "lightgreen"

oEWM.Title = "test cm - stratify"

oEWM.Table = "CMTest$"

oEWM.Where = "[invoice amount] > -5000 "

oEWM.Parm1 = "-100 0 200 500 1000 2000 3000"

oEWM.RunCmd

6.8.1.8 SummarizationMacro parameters

Example macro

The following macro summarizes invoice amounts by store using the amount “Invoice Amount”

from the worksheet “CMTest” in the workbook cmgen.xls. Only those invoice amounts greater

than zero are summarized. The output report is written to a file named t-12.txt. This report will

also contain information other than sub-totals, such as minimum and maximum values,

averages, standard deviations, etc. Because only one column (store) is being used for

summarization, the first parameter (Parm1) is set to 1. Had the summarization been by state

and by store, then this parameter would have been “2”.

Dim oEWM As New cEWM

Dim sMsg As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.Cmd = "summary"

oEWM.FileOut = "c:\test\cm\report\t-12.txt"

Audit Commander User Guide Copyright 2009 Page 107 of 135

Page 108: Audit Commander User Guide

Chapter 6 - Macros

oEWM.LocalCol = "Invoice Amount"

oEWM.Colstring = "[Store]"

oEWM.Table = "CMTest$"

oEWM.Where = "[invoice amount] > 0 "

oEWM.Parm1 = "1"

oEWM.RunCmd

Page 109: Audit Commander User Guide

Chapter 6 Macros

DateDay of week

Macro parameters

Example macro

The following macro produces a weekday report using the date “Invoice Date” from the

worksheet “CMTest” in the workbook cmgen.xls. Only those invoice amounts greater than a

credit amount of $5,000 are tested. The output chart uses a yellow theme with a title “test cm –

wd”. A text report is also output to a file named t-6.txt. These reports will show transaction

counts by day of week

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.ChartFile = "c:\test\cm\report\t-6.png"

oEWM.Cmd = "wdReport"

oEWM.FileOut = "c:\test\cm\report\t-6.txt"

oEWM.Colstring = "[Invoice Date]"

oEWM.Scheme = "yellow"

oEWM.Title = "test cm - wd"

oEWM.Table = "CMTest$"

oEWM.Where = "[invoice amount] > -5000 "

oEWM.RunCmd

Extract by day of week

The following macro produces a round number report on the amount “Invoice Amount” from the

worksheet “CMTest” in the workbook cmgen.xls. Only those invoice amounts greater than a

credit amount of $5,000 are tested. The output chart uses a pink theme with a title “test cm –

rnreport”. A text report is also output to a file named t-10.txt.

Dim oEWM As New cEWM

Dim sMsg As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.Cmd = "wd"

oEWM.FileOut = "c:\test\cm\report\t-7.txt"

oEWM.LocalCol = "Invoice Date"

oEWM.Scheme = "yellow"

oEWM.Title = "test cm - wd"

oEWM.Table = "CMTest$"

oEWM.Where = "[invoice amount] > -5000 "

oEWM.Parm1 = "1000001"

Audit Commander User Guide Copyright 2009 Page 109 of 135

Page 110: Audit Commander User Guide

Chapter 6 - Macros

oEWM.RunCmd

Page 111: Audit Commander User Guide

Chapter 6 MacrosHolidays

Macro parameters

Example macro

The following macro produces a holiday report using the date “Invoice Date” from the

worksheet “CMTest” in the workbook cmgen.xls. Only those invoice amounts greater than a

credit amount of $5,000 are tested. The output chart uses a yellow theme with a title “test cm –

Holiday Report”. A text report is also output to a file named t-8.txt. These reports and charts

provide a count and display of the number of invoices with a date falling on a federal holiday.

Dim oEWM As New cEWM

Dim sMsg As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.ChartFile = "c:\test\cm\report\t-8.png"

oEWM.Cmd = "holidayReport"

oEWM.FileOut = "c:\test\cm\report\t-8.txt"

oEWM.LocalCol = "Invoice Date"

oEWM.Scheme = "yellow"

oEWM.Title = "Test cm - Holiday Report"

oEWM.Table = "CMTest$"

oEWM.Where = "[invoice amount] > -5000 "

oEWM.Parm1 = "mdy"

oEWM.Parm2 = "US"

oEWM.RunCmd

Holiday extract and chart

The following macro extracts those transactions whose date falls on a Federal holiday. The

extract is based upon the date “Invoice Date” from the worksheet “CMTest” in the workbook

cmgen.xls. Only those invoice dates on invoices with amounts greater than a credit amount of

$5,000 are tested. The output chart uses a yellow theme with a title “test cm – Holiday”. A text

report is also output to a file named t-9.txt.

Dim oEWM As New cEWM

Dim sMsg As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.ChartFile = "c:\test\cm\report\t-9.png"

oEWM.Cmd = "holiday"

oEWM.FileOut = "c:\test\cm\report\t-9.txt"

oEWM.LocalCol = "Invoice Date"

Audit Commander User Guide Copyright 2009 Page 111 of 135

Page 112: Audit Commander User Guide

Chapter 6 - Macros

oEWM.Scheme = "yellow"

oEWM.Title = "test cm - Holiday"

oEWM.Table = "CMTest$"

oEWM.Where = "[invoice amount] > -5000 "

oEWM.Parm1 = "mdy"

oEWM.Parm2 = "US"

oEWM.RunCmd

Page 113: Audit Commander User Guide

Chapter 6 Macros6.8.1.9 Date NearMacro parameters

Example macro

The following macro extracts those transactions which are within five days of 2/10/2009, i.e.

2/5/2009 – 2/15/2009. Only invoices with an invoice amount greater than zero are tested. The

extract is based on the date “Invoice Date” from the worksheet “CMTest” in the workbook

cmgen.xls. A text report is written to a file named t-15.txt. This file can readily be imported back

into excel for further analysis.

Dim oEWM As New cEWM

Dim sMsg As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.Cmd = "datenear"

oEWM.FileOut = "c:\test\cm\report\t-15.txt"

oEWM.LocalCol = "Invoice Date"

oEWM.Table = "CMTest$"

oEWM.Where = "[invoice amount] > 0 "

oEWM.Parm1 = "2/10/2009"

oEWM.Parm2 = "5"

oEWM.RunCmd

Date Range

The following macro extracts transactions based on the date range provided, in this case

2/10/2009 through 3/10/2009. The extract file is written to a text report named t-14.txt which can

readily be imported back into excel. The work sheet used is named CMTest from the workbook

cmGen.xls.

Dim oEWM As New cEWM

Dim sMsg As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.Cmd = "daterange"

oEWM.FileOut = "c:\test\cm\report\t-14.txt"

oEWM.LocalCol = "Invoice Date"

oEWM.Table = "CMTest$"

oEWM.Where = "[invoice amount] > 0 "

oEWM.Parm1 = "2/10/2009"

oEWM.Parm2 = "3/10/2009"

oEWM.RunCmd

Audit Commander User Guide Copyright 2009 Page 113 of 135

Page 114: Audit Commander User Guide

Chapter 6 - Macros

6.8.2 Other6.8.2.1 AgeingMacro parameters

The macro below ages the numeric amount “invoice amount” on the worksheet CMTest in the

workbook cmGen.xls. Ageing is done as of 6/30/2008 using an ageing width of 30 days. An

output text report is written to the file t-10.txt and a chart is written to t-10.png which is colored

with a light green. Ageing is based upon the date in the column “Ageing date”

Example macro Dim oewm As New cEWM

Dim sMsg As String

Dim sColstring As String

oewm.Filein = "c:\test\cm\cmGen.xls"

oewm.Cmd = "age"

oewm.FileOut = "c:\test\cm\report\t-10.txt"

sColstring = "[invoice date],[invoice amount]"

oewm.Colstring = sColstring

oewm.LocalCol = "invoice amount"

oewm.Title = "Ageing of Invoices"

oewm.ChartFile = "c:\test\cm\report\t-10.png"

oewm.Scheme = "lightgreen"

oewm.Table = "CMTest$"

oewm.Parm1 = "6/30/2008"

' ageing width

oewm.Parm2 = "30"

oewm.RunCmd

Page 115: Audit Commander User Guide

Chapter 6 MacrosCalculated Values

Macro parameters

Example macro

The following macro produces a calculated value named “monthamt” which is computed by

dividing the column named “invoice amount” by 12. Arbitrarily, only those invoices with an

amount between $1,00 and $1,200 are extracted. The extract file is written to a text file named

t-32.txt which can readily be imported back into Excel.

In this example only a single calculated value is computed. Had additional calculated values

been needed, the could be specified, but must be separated by commas. For example:

“[Invoice Amount]/12 as monthamt, (cost – ad) / life as [Net Depreciation]” etc. Dim oewm As New cEWM

Dim sMsg As String

oewm.Filein = "c:\test\cm\cmGen.xls"

oewm.Cmd = "calc"

oewm.FileOut = "c:\test\cm\report\t-32.txt"

oewm.Table = "CMTest$"

oewm.Where = "[invoice amount] between 1100 and 1200 "

oewm.Parm1 = " [Invoice Amount] / 12 as monthamt"

oewm.RunCmd

Duplicates

Macro parameters

Example macro

The following macro extracts those rows which have exact duplicates which are defined as two

or more rows with the identical store and invoice number. Data is taken from the work book

named cmGen.xls on the sheet CMtest. Only those invoices with an invoice amount greater

than zero are subject to testing. In this example, duplicates were defined based upon the values

in two columns – i.e. Store and Invoice amount.

Other tests for duplicates might consider only a single column, three or more columns, etc. The

specification is completely under the control of the auditor performing the test.

Dim oEWM As New cEWM

Dim sMsg As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.Cmd = "duplicates"

oEWM.FileOut = "c:\test\cm\report\t-13.txt"

oEWM.Colstring = "[Store],[invoice number]"

Audit Commander User Guide Copyright 2009 Page 115 of 135

Page 116: Audit Commander User Guide

Chapter 6 - Macros

oEWM.Table = "CMTest$"

oEWM.Where = "[invoice amount] > 0 "

oEWM.Parm2 = "2"

oEWM.RunCmd

Page 117: Audit Commander User Guide

Chapter 6 MacrosSame, Same, Different

Macro parameters

The purpose of the macro below is to identify any two invoices on the work sheet

named CMTest in the workbook cmGen.xls which have the same invoice number

but different vendor numbers. Output is to be written to a file named t-19.txt for

further analysis.

6.8.2.1.1 Example macro

Dim oEWM As New cEWM

Dim sMsg As String

Dim sColstring As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.Cmd = "ssd"

oEWM.FileOut = "c:\test\cm\report\t-19.txt"

sColstring = "[invoice number]"

sColstring = sColstring & ",[vendor number]"

oEWM.Colstring = sColstring

oEWM.Table = "CMTest$"

oEWM.Parm2 = "2"

oEWM.RunCmd

Warning: The correct number of columns used (in this case 2) must be specified, otherwise the

results may not be correct.

Audit Commander User Guide Copyright 2009 Page 117 of 135

Page 118: Audit Commander User Guide

Chapter 6 - Macros

Data ExtractionMacro parameters

The macro below is a very basic extract procedure where the auditor wishes to

prepare a schedule from the work sheet named CMTest in the workbook named

cmGen.xls. The criteria for selection is where the column named invoice amount

is between $1,100 and $1,200. Output will be written to a text file named t-16.txt

which can then readily be imported back into Excel for further analysis.

6.8.2.1.2 Example macro

Dim oEWM As New cEWM

Dim sMsg As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.Cmd = "extractwhere"

oEWM.FileOut = "c:\test\cm\report\t-16.txt"

oEWM.LocalCol = "Invoice Date"

oEWM.Table = "CMTest$"

oEWM.Where = "[invoice amount] between 1100 and 1200 "

oEWM.RunCmd

Warning: Any column names such as “Invoice Amount” which contain embedded spaces must

have their name enclosed in brackets, otherwise the column name will be considered

two columns – invoice and amount.

Warning: Numeric amounts specified should not include any comma separators.

Fuzzy Match (LD)

Macro parameters

Example macro

The following macro extracts rows from a worksheet named CMtest in the workbook cmgen.xls.

All rows are tested for having a value in the vendor number column that is either an exact match

on “20172” or has a Levenshtein distance of 1. This would occur when either the only difference

is a single digit, or else a missing or extra digit. A text report is also output to a file named t-

23.txt. This text file can readily be imported back into Excel for further analysis.

Page 119: Audit Commander User Guide

Chapter 6 Macros

Dim oEWM As New cEWM

Dim sMsg As String

Dim sColstring As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.Cmd = "fuzzyld"

oEWM.FileOut = "c:\test\cm\report\t-23.txt"

sColstring = "[vendor number], *"

oEWM.Colstring = sColstring

oEWM.Table = "CMTest$"

oEWM.Parm1 = "1"

oEWM.Parm2 = "20172"

oEWM.RunCmd

Fuzzy Match (Regular Expression)

Macro parameters

Example macro

The following macro does a “fuzzy match” on the vendor number using a regular expression “[2-

5]1?*”. All rows on the worksheet CMTest in the workbook cmGen.xls are tested. The regular

expression [2-5]1?* will match any vendor number whose first digit is either a 2,3,4 or 5. The

second digit must be 1. The following digit can be any character or digit and the remaining

characters (zero or more) can consists of any values. An extract report is output to a file named

t-22.txt, which can readily be imported back into Excel for further analysis.

Dim oEWM As New cEWM

Dim sMsg As String

Dim sColstring As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.Cmd = "fuzzymatch"

oEWM.FileOut = "c:\test\cm\report\t-22.txt"

sColstring = "[vendor number], *"

oEWM.Colstring = sColstring

oEWM.Table = "CMTest$"

oEWM.Parm1 = "[2-5]1?*"

oEWM.RunCmd

Audit Commander User Guide Copyright 2009 Page 119 of 135

Page 120: Audit Commander User Guide

Chapter 6 - Macros

6.8.2.2 Near Miss

6.8.2.2.1 Macro parameters

The following macro checks for a “near miss” between two invoices which are not exact

duplicates, but are close. “Close” is defined by the auditor based upon two criteria –

1. The invoice dates must be within a specified number of days of each other (30 in this

example), and

2. The invoice numbers must have a degree of similarity as measured by the Levenshtein

distance.

In addition, the numeric amounts must be within two cents of each other and the vendor

numbers must match. The test uses the worksheet “CMTest” in the workbook cmgen.xls. Only

those invoice amounts greater than a credit amount of $5,000 are tested. A text report is also

output to a file named t-24.txt which can then readily be imported back into Excel.

……. Dim oEWM as new cEWM

Dim sMsg As String

Dim sColstring As String

oEWM.FileIn = "c:\test\data\EWP.xls"

oEWM.Cmd = "invne"

oEWM.FileOut = "c:\test\cm\report\t-24.txt"

' column sequence is critical - must match exact

sColstring = "[invoice date] "

sColstring = sColstring & ",[invoice amount]"

sColstring = sColstring & ",[invoice number]"

sColstring = sColstring & ",[vendor number]"

oEWM.Colstring = sColstring

oEWM.Table = "Duplicate Invoices$"

oEWM.Parm1 = "30" ' date tolerance

oEWM.Parm2 = "5" ' invoice number tolerance

oEWM.RunCmd

Warning: The comparison process is computationally intensive. Because of this, only several

hundred rows are examined at any one time. Although there is a “good chance” that

“near misses” will be identified, there is no guarantee that this process will do so.

Page 121: Audit Commander User Guide

Chapter 6 Macros6.8.2.3 Split InvoicesMacro parameters

Example macro

The following macro checks for “split invoices” which is defined as follows:

One invoice in the amount of $X exists from vendor V.

3. Vendor V also has two to four more invoices which, when combined as to amount, total

to $X. All of these invoices are within a specified number of days from each other. In the

example provided, invoices are must exist within 30 days of each other in order to be

considered “split”.

In addition, the numeric amounts must be within two cents of each other and the vendor

numbers must match. The test uses the worksheet “CMTest” in the workbook cmgen.xls. All

rows in the worksheet were tested. A text report is output to a file named t-25.txt which can then

readily be imported back into Excel.

Dim oEWM As New cEWM

Dim sMsg As String

Dim sColstring As String

oEWM.FileIn = "c:\test\data\EWP.xls"

oEWM.Cmd = "invsp"

oEWM.FileOut = "c:\test\cm\report\t-25.txt"

' column sequence is critical - must match exact

sColstring = "[invoice date] "

sColstring = sColstring & ",[invoice amount]"

sColstring = sColstring & ",[invoice number]"

sColstring = sColstring & ",[vendor number]"

oEWM.Colstring = sColstring

oEWM.Table = "Duplicate Invoices$"

oEWM.Parm1 = "30" ' date tolerance

oEWM.RunCmd

Warning: The comparison process is computationally intensive. Because of this, only a certain

number of rows are examined at any one time. Although there is a “good chance” that

“split invoices” will be identified, there is no guarantee that this process will do so. Tests

for a split invoice of two items uses approximately 200 rows, three invoices about 80

rows and four invoices about 30 rows.

Audit Commander User Guide Copyright 2009 Page 121 of 135

Page 122: Audit Commander User Guide

Chapter 6 - Macros

6.8.3 Pattern TestingBenford’s Law

Macro parameters

Example macro

The following macro performs a pattern test, using benford’s Law for invoice

amounts by store. The process is as follows:

For each store, all invoice amounts are tested using the benford’s law test

specified, in this case “F1” – first digit. The results of the observed values are

compared with that expected theoretically. Any differences are quantified using

both the Chi Square test and the Kolmogorov-Smirnov test. Once the tests have

been run for all stores, the results are shown in descending order, i.e. those

stores having the greatest difference between the theoretical expected amount

and observed are shown first. In this example all the rows on the worksheet

named CMTest in thw orkbook cmGen.xls were tested, even though criteria could

have been specified to limit testing to just certain rows.

Dim oEWM As New cEWM

Dim sMsg As String

Dim sColstring As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.Cmd = "patternben"

oEWM.FileOut = "c:\test\cm\report\t-26.txt"

sColstring = "[store],[invoice amount]"

oEWM.Colstring = sColstring

oEWM.Table = "CMTest$"

oEWM.Parm1 = "F1"

oEWM.RunCmd

Page 123: Audit Commander User Guide

Chapter 6 MacrosHolidays

Macro parameters

Example macro

The following macro performs a pattern test, using frequency of transactions

found on federal holidays. The analysis is dates by store. The process is as

follows:

For each store, all invoice dates are tested if they fall on a holiday. The counts

are tallied.The counts for each store are then compared with that for all stores.

Any differences are quantified using both the Chi Square test and the

Kolmogorov-Smirnov test. Once the tests have been run for all stores, the results

are shown in descending order, i.e. those stores having the greatest difference

between the overall population counts and the observed values for the store are

shown first. In this example all the rows on the worksheet named CMTest in the

workbook cmGen.xls were tested, even though criteria could have been specified

to limit testing to just certain rows.

Dim oEWM As New cEWM

Dim sMsg As String

Dim sColstring As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.Cmd = "patternhol"

oEWM.FileOut = "c:\test\cm\report\t-27.txt"

sColstring = "[store],[invoice date]"

oEWM.Colstring = sColstring

oEWM.Table = "CMTest$"

oEWM.Parm1 = "mdy"

oEWM.Parm2 = "US"

oEWM.RunCmd

Audit Commander User Guide Copyright 2009 Page 123 of 135

Page 124: Audit Commander User Guide

Chapter 6 - Macros

Weekdays

Macro parameters

Example macro

The following macro performs a pattern test, using frequency of transactions

found by day of the week. The analysis is dates by store. The process is as

follows:

For each store, all invoice dates are tabulated based upon the da of the week

they fall on. The counts for each store are then compared with that for all stores.

Any differences are quantified using both the Chi Square test and the

Kolmogorov-Smirnov test. Once the tests have been run for all stores, the results

are shown in descending order, i.e. those stores having the greatest difference

between the overall population counts and the observed values for the store are

shown first. In this example all the rows on the worksheet named CMTest in the

workbook cmGen.xls were tested, even though criteria could have been specified

to limit testing to just certain rows.

Dim oEWM As New cEWM

Dim sMsg As String

Dim sColstring As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.Cmd = "patternwd"

oEWM.FileOut = "c:\test\cm\report\t-28.txt"

sColstring = "[store],[invoice date]"

oEWM.Colstring = sColstring

oEWM.Table = "CMTest$"

oEWM.RunCmd

Page 125: Audit Commander User Guide

Chapter 6 MacrosData Stratification

Macro parameters

Example macro

The following macro performs a pattern test, using stratified transaction amounts.

The analysis is dollar amounts by store. The process is as follows:

For each store, all invoice amounts are stratified based upon the stratification

parameters provided by the auditor. The counts for each store are then compared

with that for all stores. Any differences are quantified using both the Chi Square

test and the Kolmogorov-Smirnov test. Once the tests have been run for all

stores, the results are shown in descending order, i.e. those stores having the

greatest difference between the overall population stratification and the observed

values for the store are shown first. In this example all the rows on the worksheet

named CMTest in the workbook cmGen.xls were tested, even though criteria

could have been specified to limit testing to just certain rows.

Dim oEWM As New cEWM

Dim sMsg As String

Dim sColstring As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.Cmd = "patternstrat"

oEWM.FileOut = "c:\test\cm\report\t-30.txt"

sColstring = "[store],[invoice amount]"

oEWM.Colstring = sColstring

oEWM.Table = "CMTest$"

oEWM.Parm1 = "-100 0 200 500 1000 5000 10000 20000"

oEWM.RunCmd

Audit Commander User Guide Copyright 2009 Page 125 of 135

Page 126: Audit Commander User Guide

Chapter 6 - Macros

Round numbers

Macro parameters

Example macro

The following macro performs a pattern test, using frequency of round numbers.

The analysis is dollar amounts by store. The process is as follows:

For each store, all invoice amounts are checked for being “round” and the counts

are tabulated by type. The counts for each store are then compared with that for

all stores. Any differences are quantified using both the Chi Square test and the

Kolmogorov-Smirnov test. Once the tests have been run for all stores, the results

are shown in descending order, i.e. those stores having the greatest difference

between the overall population counts and the observed values for the store are

shown first. In this example all the rows on the worksheet named CMTest in the

workbook cmGen.xls were tested, even though criteria could have been specified

to limit testing to just certain rows.

Dim oEWM As New cEWM

Dim sMsg As String

Dim sColstring As String

oEWM.FileIn = "c:\test\cm\cmGen.xls"

oEWM.Cmd = "patternrn"

oEWM.FileOut = "c:\test\cm\report\t-29.txt"

sColstring = "[store],[invoice amount]"

oEWM.Colstring = sColstring

oEWM.Table = "CMTest$"

oEWM.RunCmd

6.8.4 SamplingStratified Attribute Sampling Assessment

Macro parameters

Example macro

The following macro performs a pattern test, using frequency of transactions

found by day of the week. The analysis is dates by store. The process is as

follows:

Page 127: Audit Commander User Guide

Chapter 6 MacrosFor each store, all invoice dates are tabulated based upon the da of the week

they fall on. The counts for each store are then compared with that for all stores.

Any differences are quantified using both the Chi Square test and the

Kolmogorov-Smirnov test. Once the tests have been run for all stores, the results

are shown in descending order, i.e. those stores having the greatest difference

between the overall population counts and the observed values for the store are

shown first. In this example all the rows on the worksheet named CMTest in the

workbook cmGen.xls were tested, even though criteria could have been specified

to limit testing to just certain rows.

Dim oewm As New cEWM

Dim sMsg As String

Dim sColstring As String

oewm.Filein = "c:\test\ewp\Neyman v3.xls"

oewm.Cmd = "saacc"

oewm.FileOut = "c:\test\cm\report\t-35.txt"

sColstring = "[audited]"

sColstring = sColstring & ",[stratum]"

sColstring = sColstring & ",[selected]"

oewm.Colstring = sColstring

oewm.LocalCol = "stratum"

'oEWM.Title = "Stratified Variable Population"

'oEWM.ChartFile = "c:\test\cm\report\t-32.png"

'oEWM.Scheme = "lightgreen"

oewm.Table = "Attrib$"

'number of columns

'oEWM.Parm1 = "45"

oewm.Parm2 = ".95"

oewm.RunCmd

Audit Commander User Guide Copyright 2009 Page 127 of 135

Page 128: Audit Commander User Guide

Chapter 6 - Macros

Stratified Attribute Sampling Population

Macro parameters

Example macro

Dim oewm As New cEWM

Dim sMsg As String

Dim sColstring As String

oewm.Filein = "c:\test\ewp\Neyman v3.xls"

oewm.Cmd = "sapop"

oewm.FileOut = "c:\test\cm\report\t-34.txt"

sColstring = "[audited]"

sColstring = sColstring & ",[stratum]"

sColstring = sColstring & ",[selected]"

oewm.Colstring = sColstring

oewm.LocalCol = "stratum"

oewm.Table = "Attrib$"

‘ precision

oewm.Parm2 = ".95"

oewm.RunCmd

Page 129: Audit Commander User Guide

Chapter 6 MacrosStratified Variable Sampling Assessment

Macro parameters

Example macro

Dim oewm As New cEWM

Dim sMsg As String

Dim sColstring As String

oewm.Filein = "c:\test\ewp\Neyman v3.xls.xls"

oewm.Cmd = "svpop"

oewm.FileOut = "c:\test\cm\report\t-32.txt"

sColstring = "[examined]"

sColstring = sColstring & ",[stratum]"

sColstring = sColstring & ",[selected]"

oewm.Colstring = sColstring

oewm.LocalCol = "stratum"

oewm.Table = "Neyman$"

'number of samples

oewm.Parm1 = "35"

' precision

oewm.Parm2 = ".95"

oewm.RunCmd

Stratified Variable Sampling Population

Macro parameters

Dim oewm As New cEWM

Dim sMsg As String

Dim sColstring As String

oewm.Filein = "c:\test\ewp\Neyman v3.xls"

oewm.Cmd = "svacc"

oewm.FileOut = "c:\test\cm\report\t-33.txt"

sColstring = "[examined]"

sColstring = sColstring & ",[stratum]"

sColstring = sColstring & ",[selected]"

oewm.Colstring = sColstring

oewm.LocalCol = "stratum"

oewm.Parm1 = "45"

oewm.Parm2 = ".95"

oewm.RunCmd

Audit Commander User Guide Copyright 2009 Page 129 of 135

Page 130: Audit Commander User Guide

Chapter 7 - Installation

7 Installation

7.1 Overview

Installation of the software is done using a standard “setup.exe”. The setup file may be

downloaded from http://ezrstats.com/online/inno/ACSetup.exe. There are two general

techniques for installation:

• Standard – double click the “setup.exe” and answer the questions, or

• Silent – accept all the installation defaults without any prompting

7.2 Silent vs. “Regular” install

The advantage of a “silent” install is that it is faster and easier. Disadvantages are that any non-

default installation options cannot be selected.

7.3 Registering the software

The software is free and does not require a license or registration key.

7.4 Installation options

Installation options include the name of the directory where the software is installed. The default

values is “c:\program files\ezs\ac”, but may be changed during the installation process.

7.5 Installation trouble Shooting

7.6 If there are problems during the installation, consider the following points:

• Close all other applications which are running

Page 131: Audit Commander User Guide

Chapter 7 - Installation• If a previous version of the software has been installed, first remove that version using

either the uninstall program provided or else the Control Panel add and remove pro-grams

• Make sure that the installation drive contains at least 40 MB of free space.

7.7 Files/data that are installed

The files and data that are installed include the program executables, test data files, license

information and some miscellaneous data files. All files installed are located in the application

installation directory (default c:\program files\ezs\ac”).

7.8 Registry entries that are created

A number of registry entries are created, all under the user key “Software/EZS/AC”. Three root

folders are created under this registry entry. The values stored here are to assist in navigation

and use of the software. The registry entries also track the license number and other licensing

information.

Audit Commander User Guide Copyright 2009 Page 131 of 135

Page 132: Audit Commander User Guide

Appendix A – Electronic Work Papers

8 Appendix A – Example Electronic work papers

Below is an example portion of the file “Query.ini” which is used for the production of electronic

work papers. The entire file is included with the software distribution.

[1089-0]

Title = Purchases and Payments

AuditPeriod = Fiscal Year Ending 11-30-2008

Folder = c:\test\temp\

[1089-1]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Age invoices by supplier

Command = age

Table = PPTest$

Where =

Column =

ColString = [invoice date],[invoice amount]

Parm1 = 3/31/2007

Parm2 = mdy

Scheme = summer

Title = Ageing of supplier invoices

[1089-2]

Select = OK

DataSource = c:\program files\ezs\ac\data\EWP.xls

Objective = Summarize invoices by supplier and agree to

ledger

Command = summary

Table = PPTest$

Where =

Column = amount paid

ColString = [vendor number]

Parm1 =

Parm2 = 1

Scheme =

Title =

Page 133: Audit Commander User Guide

Appendix B – Monitoring Files

Audit Commander User Guide Copyright 2009 Page 133 of 135

Page 134: Audit Commander User Guide

Appendix B – Example monitoring files

9 Appendix B – Example Monitoring Files

Below is an example section of a monitoring file for the preparation of a linear regression test

with confidence and prediction intervals.

[Bus Maintenance Expense - Pareto]

ChartFile = "c:\program files\ezs\ac\report\t-8.png"

Title = "Bus Maintenance Expense - FYE 6/30/2007"

BGColor = gold

ChartWidth = 600

ChartHeight = 540

DataChartColor = yellow

ChartBoxColor = "light yellow"

TextBoxColor = "tan"

YLabel = "Bus Maintenance expense"

XLabel = "County"

DataTitle = "Major School Systems"

ChartPosPct = 0.1

CType = "pareto"

BarColor1 = brown

BarColor2 = tan

Infile = "c:\program files\ezs\ac\data\Data.xls"

Outfile = "c:\program files\ezs\ac\report\t-8.txt"

SQL = "Select county, mileage, expense from [Pareto$] order

by mileage desc;"

Page 135: Audit Commander User Guide

Appendix A – Electronic Work Papers

Comment form

Please send any comments, suggestions or items identified as errors to:

[email protected]

Although I am not able to respond to all such comments and suggestions, I will try to do so as feasible. Registered users of Audit Commander will be notified as revised versions of the manual are released.