SlideShare a Scribd company logo
Auditing
  Data contained in
  Excel
  Worksheets

Audit Commander
Audit Guide
Data analysis made easier…
                                      EZ-R Stats, LLC
  Auditing data on Excel worksheets
Audit Commander



      The software described in this document makes data analysis
      easier, particularly if it is contained in an Excel work book. The
      software may be freely downloaded and used without restriction for
      any purpose – commercial, educational or personal. Additional
      information about the audit software is available at the web site.
      Although a significant amount of testing has been performed, there
      is no guarantee that every function works as documented. All
      comments and suggestions are welcome. Comments
      The software is currently being used to teach auditing concepts,
      statistical sampling and data mining. EZ-R Stats, LLC is registered
      with the North Carolina State Board of Certified Public Accountant
      Examiners as a provider of Continuing Professional Education.




Auditing data on Excel worksheets
Auditing data on Excel worksheets

 Document History

 Revision History
Revision   Revision Date   Summary of Changes        Author
Number
1.0        10-17-2009      Initial Version           M. Blakley
1.1        11-12-2009      Trend Line and additional M. Blakley
                           error checking. New
                           style of input form.
Auditing data on Excel worksheets


Table of Contents


1 ABOUT THIS GUIDE................................................................................................1

1.1 Who Should Use It...........................................................................................................................................1

1.2 Typographical Conventions ...........................................................................................................................1

1.3 Purpose.............................................................................................................................................................2

1.4 Scope.................................................................................................................................................................2

1.5 Intended audience............................................................................................................................................3

1.6 Hardware requirements..................................................................................................................................3

1.7 Software requirements....................................................................................................................................3


2 GETTING STARTED.................................................................................................4

2.1 Working with Excel data.................................................................................................................................4

2.2 Audit objectives................................................................................................................................................5

2.3 Accomplishing audit objectives......................................................................................................................5


3 USING THE SOFTWARE.........................................................................................6

3.1 Opening form...................................................................................................................................................7

3.2 Analyzing data on Excel worksheets............................................................................................................10
   3.2.1 Selecting the data for analysis..................................................................................................................10
   3.2.2 Selecting the columns for analysis...........................................................................................................12
   3.2.3 Select chart colors....................................................................................................................................14
   3.2.4 Select the command to be processed........................................................................................................15
   3.2.5 Specifying selection criteria.....................................................................................................................20
Auditing data on Excel worksheets
   3.2.6 The logging facility..................................................................................................................................21


4 AUDIT COMMANDS.................................................................................................1

4.1 Numeric............................................................................................................................................................2
   4.1.1 Population Statistics...................................................................................................................................2
   4.1.2 Round Numbers..........................................................................................................................................7
   4.1.3 Benford’s Law..........................................................................................................................................11
   4.1.4 Stratify......................................................................................................................................................15
   4.1.5 Summarization..........................................................................................................................................19
   4.1.6 Top and Bottom 10...................................................................................................................................22
   4.1.7 Histograms................................................................................................................................................25
   4.1.8 Box Plot....................................................................................................................................................29
   4.1.9 Random numbers......................................................................................................................................33

4.2 Date.................................................................................................................................................................37
   4.2.1 Holiday Extract.........................................................................................................................................37
   4.2.2 Week days.................................................................................................................................................41
   4.2.3 Holiday summary.....................................................................................................................................44
   4.2.4 Ageing......................................................................................................................................................48
   4.2.5 Date Near..................................................................................................................................................52
   4.2.6 Date Range...............................................................................................................................................54
   4.2.7 Week days Report.....................................................................................................................................56

4.3 Other...............................................................................................................................................................59
   4.3.1 Gaps in Sequences....................................................................................................................................59
   4.3.2 Data Extraction.........................................................................................................................................62
   4.3.3 Duplicates.................................................................................................................................................66
   4.3.4 Same, Same, Different..............................................................................................................................69
   4.3.5 Trend Lines...............................................................................................................................................72
   4.3.6 Time Line analysis....................................................................................................................................75
   4.3.7 Confidence Band......................................................................................................................................82
   4.3.8 Confidence Band (Time Series)...............................................................................................................85
   4.3.9 Invoice Near Miss....................................................................................................................................89
   4.3.10 Split Invoices..........................................................................................................................................92
   4.3.11 Check SSN..............................................................................................................................................94
   4.3.12 Check PO Box........................................................................................................................................97
Auditing data on Excel worksheets

   4.3.13 Calculated Values.................................................................................................................................100
   4.3.14 Fuzzy Match (LD)................................................................................................................................103
   4.3.15 Fuzzy Match (Regular Expression)......................................................................................................105
   4.3.16 Sequential Invoices...............................................................................................................................108

4.4 Patterns.........................................................................................................................................................110
   4.4.1 Round Numbers......................................................................................................................................110
   4.4.2 Data Stratification...................................................................................................................................114
   4.4.3 Day of Week...........................................................................................................................................117
   4.4.4 Holidays..................................................................................................................................................120
   4.4.5 Benford’s Law........................................................................................................................................123

4.5 Sampling.......................................................................................................................................................126
   4.5.1 Attributes – Unrestricted: Stop and Go..................................................................................................126
   4.5.2 Variable Sampling – Unrestricted Stop and Go......................................................................................133
   4.5.3 Stratified Variable Sampling – Population.............................................................................................139
   4.5.4 Stratified Variable Sampling – Assessment............................................................................................142
   4.5.5 Stratified Attribute Sampling – Population............................................................................................144
   4.5.6 Stratified Attribute Sampling – Assessment...........................................................................................147


5 ACCESS DATABASES AND EXCEL WORKBOOKS.........................................149

5.1 Overview.......................................................................................................................................................149

5.2 The “Excel/Access” menu item...................................................................................................................150

5.3 An example...................................................................................................................................................151

5.4 Working with text files................................................................................................................................155

5.5 The “File” tab...............................................................................................................................................155

5.6 An example...................................................................................................................................................156


6 TECHNIQUES FOR “DRILL DOWN”..................................................................160

6.1 Numeric........................................................................................................................................................162

6.2 Text................................................................................................................................................................162
Auditing data on Excel worksheets
6.3 Date / Time...................................................................................................................................................163

6.4 Logical tests..................................................................................................................................................164

6.5 Combinations...............................................................................................................................................164

6.6 Nesting functions..........................................................................................................................................164

6.7 Selection criteria..........................................................................................................................................165


7 APPENDIX – SOFTWARE INSTALLATION........................................................167


8 COMMENT FORM ...............................................................................................173
1 About this guide


This document is divided into the following chapters:

        •   Chapter 1 – Overview

        •   Chapter 2 – Getting started

        •   Chapter 3 – Auditing data on Excel work sheets

        •   Chapter 4 –The commands and how to use them

        •   Chapter 5 –Access databases and Excel workbooks

        •   Chapter 7 –“Drill down”

        •   Appendix – Software installation




         1.1 Who Should Use It
Auditors, researchers, business analysts and academics who use data analysis to perform their
jobs.

   •    Auditors: can use the software to for a variety of common audit tasks. Altogether, over
        40 useful analytical audit functions are included

   •    Researchers: use the software for:

        •   Data analysis, trend investigation

        •   Preparation of statistical reports and charts



         1.2 Typographical Conventions
This document uses the following typographical conventions:



Auditing data on Excel worksheets                                               Page 1
Auditing data on Excel worksheets

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

   •    Screen output and code samples appear in mono space type.



            1.3 Purpose
The purpose of this monograph is to provide a practical guide to auditing data contained on
Excel work sheets using the Audit Commander. Over 40 useful audit tests and data analyzes
can be performed. Although the primary source of data will be that contained on Excel work
sheets, the technique described also applies to certain other data sources such as Excel
workbooks, Access databases, as well as text files that are in a specific format (“tab separated
values”).


The auditor does not need special computer skills in order to be able to perform these tests
because they are largely menu driven with “fill in the blanks”.


Development of the software began in August 2005 when the author searched fruitlessly for a
relatively easy to use, economical software package for analyzing data on Excel work sheets
(and other). During its development, suggestions and improvements were made by a variety of
audit practitioners.


More information about the system is available from the website, More information is also
available about the author.




            1.4 Scope
This guide explains how to install the software, the general purpose of the functions provided, as
well as examples of use.




Auditing data on Excel worksheets                                                 Page 2
Auditing data on Excel worksheets
        1.5 Intended audience
The software is intended for use by both internal and external auditors, researchers, program
monitors, students learning data analysis, business analysts and anyone else interested in
analyzing data contained on Excel work sheets in a more efficient and effective manner.


        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)




 Auditing data in Excel
                                                                            Page 3
 worksheets
Auditing data on Excel worksheets



2 Getting Started



         2.1 Working with Excel data
Although Excel is a powerful tool, some audit analyzes are difficult or time consuming to perform.
The worksheet analyzer is a stand-alone program which is suitable for performing more than 30
of the most commonly needed analytical tests. This program also includes very powerful “drill-
down’ capabilities to enable the auditor or researcher to quickly isolate and locate the data that is
of special interest. This system does not require that the data be pre-sorted or specially
formatted.


The worksheet analyzer is generally used to analyze all or portions of single Excel spread
sheets. However, it can also be used to analyze data contained within MS-Access databases,
as well as text files in various formats (e.g. comma separated values, tab separated values, print
format, etc.)


The worksheet analyzer derives much of its capabilities by leveraging the software provided by
Microsoft called “ActiveX Data Objects” which provides significant database capabilities. These
database capabilities are in turn incorporated into and used by the software to provide a variety
of capabilities of special interest to auditors and data analysts.


The primary advantages of the Work sheet analyzer include:

        •    Pre-built functions for the most common audit tasks

        •    Significantly reduced time required to perform more complex extracts and analyzes

        •    No need to “pre-sort” the data

        •    Built-in help functions to simplify the process

        •    Small footprint - doesn’t require a lot of screen “real estate”




Auditing data on Excel worksheets                                                   Page 4
Auditing data on Excel worksheets
        •   Logging facility – log work performed, can be shared or used as a basis for future
            analysis




The primary disadvantages of the Work sheet analyzer include :

        •   Is not completely “bullet proof” (some mistyped commands cause it to crash)

        •   Much slower with Excel 2007 than Excel 2003

        •   Computations for attribute sampling are slow with populations > 1,000




         2.2 Audit objectives
As each available command is presented, one or more examples of specific audit objectives
which might be accomplished using that command will be included and discussed. Often entire
audit steps can be accomplished using the commands built into the system


         2.3 Accomplishing audit objectives
Often, data being audited is available in Excel worksheets, after it has been extracted or
downloaded from various data sources. Once this data has been loaded onto one or more Excel
work sheets, the analyst should often perform a variety of tests in order to be able to arrive at an
audit conclusion.




 Auditing data in Excel
                                                                               Page 5
 worksheets
Auditing data on Excel worksheets



3 Using the software


Although the software is a stand-alone program, by design it is intended for use with Excel, and
is small enough that the form can reside along side the Excel workbook which contains the data
to be examined. This is done by having both the Excel workbook open as well as the Audit
Commander form on the same page while both are open. This makes it easier to transfer data
back and forth between the systems while doing a review.


An example screen shot is shown below to illustrate a case where a range of data on the
worksheet is being analyzed.




By intentionally keeping the Audit Commander form small, it becomes easier to transfer the
information from the Excel work book to the form, analyze the data and then “paste” the results


Auditing data on Excel worksheets                                                Page 6
Auditing data on Excel worksheets
back into the Excel work book. Note that the results of any analysis performed are also stored in
the audit directory specified, so it is not necessary to also store the results in Excel.


         3.1 Opening form
The opening form has three main menu items as shown below. Each of these menu items are
used to provide various types of processing information in order to analyze data.




The “commands” menu item is used to select the command or type of analysis to be performed.
The remaining menu items are “forms” which are used to gather and process information. A
summary description of the purpose of each form is provided in the table below.



         Tab Name                                           Purpose
Clipboard                                     Process data that has been copied to
                                              the clipboard (generally from Excel
                                              sheets but can include others)
Text files                                    Analyze data contained in text files (e.g.
                                              comma separated value format, tab
                                              separated value format, etc.)

 Auditing data in Excel
                                                                                 Page 7
 worksheets
Auditing data on Excel worksheets


Excel/Access                                   Analyzing data in Excel workbooks or
                                               Access databases
Where                                          Specifying and using more complex
                                               selection criteria
Report                                         View report produced (report is also
                                               written to a file)
Chart                                          Chart title and color scheme for chart
                                               prepared (if applicable)
Audit                                          Audit and folder information

The typical sequence used for running an audit analysis of data on a worksheet is as follows:
    1. If not already done, specify the location where the audit results are to be stored, along
         with the audit title, audit step number, etc. (“Audit” form)
    2. Select the type of analysis to be performed (menu of 40+ commands)
    3. Select the data to be analyzed, the columns or rows to be tested, along with any
         additional information required for the analysis (“Clipboard/MS/Text” form)
    4. If specific criteria are to be used (i.e. the test is for an extract of the data), specify this
         information (“Where” tab)
    5. If the data to be tested is from the clipboard, then copy the data to be tested from the
         worksheet. This is done by first highlighting the data, then copying it to the clipboard
         using methods such as 1) keyboard combination “Control-C”, 2) menu selection “Edit|
         Copy”, or 3) right mouse click and select “Copy”. (“Clipboard” form)
    6. On the tab labeled “Form”, click the button labeled “Run” (“Clipboard” form)
    7. Wait until the analysis is finished, as indicated with a status message on the Status Bar
         of the Audit Commander form. (“Clipboard” form)
    8. View the report (“Report” tab)
    9. If desired, the output in the audit folder specified may also be viewed. This includes both
         a text report as well as any charts prepared (if applicable).
    10. Analysis report results can also be copied to the clip board (“Report” tab)
    11. Change audit parameters or specify different tests and repeat the steps above



Note: If the data to be tested resides in an Excel workbook, Access database or text file,
   then “MS” or “File” tabs are used instead.


Auditing data on Excel worksheets                                                       Page 8
Auditing data on Excel worksheets
Each of these steps are illustrated below using an example analysis. In this analysis, the auditor
wishes to perform a test of fixed asset costs using Benford’s Law.


Step 1 – Specify audit information (if not already done)




Clicking on the “Audit” tab displays the information used to store the results for the analysis
performed. If any of this information needs to be changed, it can be overtyped and then the
button labeled “Update” clicked to store the information. The folder shown (in this case
C:testtemp” is the location where the reports and graphics produced by the audit analysis will
be stored. The folder name can be selected by clicking on the button labeled “Folder”, or else
overtyping the name in the text box.
The step number is used to uniquely identify the output. The starting step number is shown
above, and will be increased by one every time a procedure is run.
Once the information has been entered, click on the button labeled “Update” to save the
information. An informational message will be displayed on the status bar to acknowledge that
the change has been applied. This change will be in effect until the next change is applied.




Warning:    Existing report files and graphics can be overwritten if the starting step number is too
            low.




 Auditing data in Excel
                                                                                 Page 9
 worksheets
Auditing data on Excel worksheets


         3.2 Analyzing data on Excel worksheets

Once the audit parameter information has been entered (or checked), the data analysis
procedures can be performed. If the data to be analyzed is contained on an Excel worksheet,
then the analysis process begins with the first tab, which is labeled “Form”.



Note: If data in Excel work books, Access databases or text files are to be analyzed, the
   tables “MS” and “File” should be used instead.



3.2.1 Selecting the data for analysis

The first step is to select the data to be analyzed. This is done by highlighting the area on the
worksheet to be analyzed and then copying it to the clipboard using any of four methods:


    1. Press the keyboard combination “Control – C”
    2. Right mouse click and specify “Copy”




Auditing data on Excel worksheets                                                  Page 10
Auditing data on Excel worksheets




Often, the data to be reviewed will be in vertical format as shown here. However, in some cases
the data will be organized horizontally (e. g. in comparative financial statements). If the data is
organized horizontally, then the checkbox “rows” on the main form needs to be checked before
the data is “pasted” into the form.




 Auditing data in Excel
                                                                               Page 11
 worksheets
Auditing data on Excel worksheets

Use the toolbar “copy” icon




    3. Use the menu “Edit|Copy”




3.2.2 Selecting the columns for analysis

Once the data to be analyzed has been copied to the clipboard, it can then be “pasted” onto the
Audit Commander form. If the first row of the header contains column names, then the
checkbox just below the “Paste” button must be checked. When the data is pasted onto the


Auditing data on Excel worksheets                                               Page 12
Auditing data on Excel worksheets
form, the column names will be placed into the drop down list so that the column to be analyzed
can be selected. If the area copied does not contain column names, then leave the check box
unchecked, and the system will assign column names “Col001”, “Col002” and so on.




Once the data has been pasted onto the form, the name of the first column is shown, and any
other column can be selected from the drop down list. For this test, the second column, named
“Cost” will be selected. The test to be performed will be to identify the three largest values. So
the command “Largest values” is selected from the command drop down list.


If the column name is blanked out, then all the data pasted will be processed in accordance with
the information below:




 Auditing data in Excel
                                                                              Page 13
 worksheets
Auditing data on Excel worksheets

The option to process the entire area pasted is available only for those functions which normally
process only a single column of data (list is in the table below). Depending upon the function
selected, only numeric data, date data or all data will be processed. The type of data processed
is shown in the table below.


                      Command Description                      Type of data processed
           Numeric functions
           Benford’s law                                     Numeric only
           Population statistics                             Numeric only
           Histogram                                         Numeric only
           BoxPlot                                           Numeric only
           TopN                                              Numeric only
           BottomN                                           Numeric only
           Stratify                                          Numeric only
           Gaps                                              Numeric only
           Date Functions
           Weekday Report                                    Date only
           Weekday Extract                                   Date only
           Holiday Report                                    Date only
           Holiday extract                                   Date only
           Date Near                                         Date only
           Date Range                                        Date Only
           Other Functions
           Fuzzy match – Levenshtein distance                (All)
           Fuzzy match – regular expression                  (All)




3.2.3 Select chart colors

For commands which produce a chart, the chart title and chart colors can be specified using the
“Chart” tab.


Although all commands will produce a text file report, only certain commands will also prepare a
chart. Both the title of the chart and the color scheme used can be specified. The color scheme
can be specified in three formats:
    1. “pre-set” scheme selected from the drop down list, e.g. “fall”
    2. A range of colors between two specified values, e.g. brown – light tan (Note that a dash
        separates the color names)
    3. A range of colors specified for a numbered color group, e.g. turquoise 1 – 4. This is
        equivalent to the specification turquoise 1 – turquoise 4, but shorter to type. Note that
        only certain color names have color groups.

Auditing data on Excel worksheets                                                  Page 14
Auditing data on Excel worksheets

A complete list of color names accepted by the system and how they appear can be seen.
Examples of color ranges and how they appear can be seen – examples show a histogram and
use a chart title which specifies the color names used in the range. Two documents showing
examples are provided, both are predominantly harmonious color schemes. The first shows
color ranges for colors in a tight range (conservative). This is a PDF document of 251 pages
and is 8.4 MB in size. The second range of colors are less conservative, but still harmonious,
and are shown on a PDF document of 226 pages which has a size of 7.6 MB.


The case for chart colors can be either upper or lower case. Spaces are ignored. Thus the
following three specifications are equivalent:


    •   Turquoise 2
    •   TURQUOISe2
    •   Tur quoise 2



3.2.4 Select the command to be processed

The next step is to select the command to be processed from the command menu. The
commands are organized by function type.




 Auditing data in Excel
                                                                            Page 15
 worksheets
Auditing data on Excel worksheets

Once the command has been selected, a help message is displayed on the status bar indicating
what additional information is needed. If no additional information is needed, the status bar will
read “(No additional info)” and the info text box will not be displayed. However, if additional
information is required, the help message will be displayed on the status bar and the “Info” box
will be displayed. The resulting form is as follows:




The form now displays a fourth line called “Other info” and also displays an abbreviated help
message on the status bar: “number of values, e.g. 10”. The help message indicates that the
Other info is required and consists of a single value and the default value is “10”. In order
words, for the largest value test, the largest 10 items will be selected. In this case, we want only
the largest three values, so the number 3 is then typed into the “Other info” box.




Auditing data on Excel worksheets                                                    Page 16
Auditing data on Excel worksheets

Since all the needed information has been entered, the “Run” button can be clicked in order to
perform the analysis. After clicking the “Run” button, there will be a pause while the system
processes the information. Once processing is complete, the location of the output file will be
shown on the status bar. If a chart was also produced, it will have the same name as the output
text report file, but with a suffix of “.png”. An example of the form appears as follows:




As shown on the status bar, the report has been written to the file named “c:testtempstep-2.txt”
in the directory requested. The initial portion of the report (up to a maximum of 2,000
characters), can also be viewed by clicking on the tab labeled “Report”.




 Auditing data in Excel
                                                                               Page 17
 worksheets
Auditing data on Excel worksheets




The report lists the three lowest valued cost items in the range selected. Remaining information
about these items can be viewed by scrolling the view to the right. Note that the report has also
been stored in the report file specified.


At this point there are several options:


    •   Return to the “Clipboard” form and select another command to be processed, e.g.
        Benford’s Law test”
    •   Return to the “Clipboard” form and select another column to be processed, e.g. “AD”
        (accumulated depreciation)
    •   Return to the “Clipboard” form and “paste” another worksheet area for processing
    •   Switch to any of the other tabs for additional processing.
Go to a blank area in the current (or other) worksheet and “paste” the report results into that
worksheet.

Note: When a command is run, the results of that command can also be pasted to the
   clipboard by clicking on the “Copy” button, making it easy to do further processing or
   analysis by pasting this information on a worksheet.




Auditing data on Excel worksheets                                                  Page 18
Auditing data on Excel worksheets




Results are written to both a text file and a chart. In the example shown, the report was written
to the text file “c:testtempstep-8.txt” and a chart was produced and stored with almost the
same name, i.e. “c:testtempstep-8.png”. The results were stored in the directory “c:testtemp”
because that folder was specified as the Audit folder in this instance (can be changed using the
“Audit” form).




 Auditing data in Excel
                                                                              Page 19
 worksheets
Auditing data on Excel worksheets




For the population statistics command, the counts for positive, negative and zero amounts are
shown, along with the totals.

Note: The default color for the chart is blue and can be overridden using the values under
   the “Chart” tab.




3.2.5 Specifying selection criteria




Auditing data on Excel worksheets                                               Page 20
Auditing data on Excel worksheets




Clicking on the label named “Where?” causes the selection criteria help form above to be shown.
This form is useful in reminding you of the syntax for various types of selection that can be
performed. Of the templates shown, an example can be selected from the drop down list, then
modified and then copied over to the main processing form.




3.2.6 The logging facility

A complete record of the processing performed can be recorded automatically in a log file. The
log file records the processing performed in “macro” format so that it can be re-performed at a
future date or shared with others.
To perform logging, only two actions are needed:
Specify the name of the log file to be used (only required is a different logfile is used from prior
times)
For the processing performed, check the box on the form to indicate that logging is desired. This
check box can be turned on and off at will. When turned off, no logging is recorded until the
check box is turned back on.


The primary advantages of logging are:
    1. Maintain a complete record of the processing performed
    2. Record processing instructions so that the actions can be re-performed, now or in the
         future
    3. Share processing information with others
    4. Document the work performed
 Auditing data in Excel
                                                                                Page 21
 worksheets
Auditing data on Excel worksheets



The primary disadvantage of logging is:
            •   Takes a minor amount of disk space and CPU cycle time
Logging information is specified using the “Audit” form as shown below.




Auditing data on Excel worksheets                                         Page 22
Auditing data in Excel workbooks


4 Audit Commands


Types of queries
There are some 40+ 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.




Auditing data on Excel worksheets                                             Page 1
Audit Commands




             4.1 Numeric

    4.1.1 Population Statistics

                                          Population Statistics
Overview / Use in Audit Procedures
The population statistics command is the “work horse” of the system and can be used alone to
provide information for many audit steps. Just a few examples include:

   •   Obtaining control totals

   •   Preparing a population distribution for sample or audit planning

   •   Identifying counts and amounts of possible exceptions

   •   Quantifying the number and amount of records meeting various conditions

   •   Identifying counts and amounts of transactions within date ranges

The population statistics command produces three text reports and one graphic:

   1. Basic statistics

   2. Histogram data

   3. Percentile report


Basic 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 supporting
details to ledger amounts, testing for procedural compliance, etc. In the example below, a histogram
chart and histogram data is to be prepared for fixed asset costs. The purpose of the procedure is to
obtain an overview of the fixed assets cost information, identify potential errors or extreme values and
provide information for audit planning.


The statistics command can be used for a variety of purposes, including:
   •   Obtaining counts of transactions meeting a condition or criteria


    Auditing data on Excel worksheets                                                  Page 2
Audit Commands
    •     Obtaining transaction totals
    •     Obtaining univariate statistics for the reasonableness tests, sample planning, etc.
    •     Obtaining histogram information
    •     Obtaining percentile information

Usage Example 1
In a test of fixed assets, determine the count and amount of fixed assets which have been over
depreciated.
Approach – using the “population statistics” command, obtain totals and counts where the asset cost
less accumulated depreciation is less than salvage.
Audit Command values
          Column value – Cost
          Text Box – (empty)
          Where – (cost – ad) < salvage
Results
          Counts, totals, minimum, maximum, etc. for all assets which have been over depreciated.


Usage Example 2
For the purposes of sample planning, determine the distribution of values for fixed asset costs in order to
be able to plan strata to use for stratified sampling.
Approach – using the “population statistics” command, obtain a histogram of fixed asset costs.
Audit Command values
          Column value – Cost
          Text Box – (empty)
          Where – (empty)




The command shown below produces three reports for cost totals for location ‘ABC’. This is a very
basic example of the command. It is possible to specify considerably more complex selection criteria.
In addition, it is possible to prepare statistics for certain calculated amounts that are not contained in the
file or the worksheet. An example might be statistics for net book value measured by “cost – ad” (cost
less accumulated depreciation.




        Auditing data in Excel
                                                                                     Page 3
        worksheets
Audit Commands




                                      Output results
                                    Population Statistics




Auditing data on Excel worksheets                           Page 4
Audit Commands
Output results (pasted into Excel work sheet)




The results above were “copied” from the form and then “pasted” into a worksheet. An alternative would
be to import the report as a text file into Excel.
                                                Output results




      Auditing data in Excel
                                                                               Page 5
      worksheets
Audit Commands



                                            Histograms
Output results (chart)
The chart below was specified using a custom color scheme and the title shown. These values are
provided using the “Chart” tab on the processing form.




                                        Output results - chart




    Auditing data on Excel worksheets                                             Page 6
Audit Commands
     4.1.2 Round Numbers


                                          Round numbers
Overview / Use in Audit Procedures
Round numbers are often an indicator of estimates, which may be appropriate in certain cases (e.g.
journal entries), but not appropriate in others (e.g. purchase orders, invoices, expense reports, etc.).
The system can be used to identify the extent (if any) to which round numbers are being used as well as
extract data based upon types of round numbers. The system defines a round number as one which is
a whole number (i.e. no pennies), and contains one or more zeros immediately to the left of the decimal
point, without any intervening digits other than zero. The number of such zeros determines the “order”
of the round number. The chart below indicates examples of various round numbers, as well as their
“order”. If a number is not round, then it will be classified as “NR” (not round).
 Example                                                Order
 15,000.00                                              3
 10                                                     1
 123.19                                                 NR
 1,000,000.00                                           6
 20.19                                                  NR
Examples of tests which can be performed are provided below:
In a test of purchase orders, determine the frequency of round numbers for purchase orders. There is
an allegation relating to purchases at store number ‘123’.
Approach – using the “round numbers” command, obtain frequencies for round numbers on purchase
orders, classified as to type of round number.
Audit Command values
          Column value – Purchase order amount
          Text Box – (empty)
          Where – [store number] = 123
Results
          Frequencies of round numbers used on purchase orders for store number 123.


Usage Example 2
In a test of journal entries, determine the frequency and extent of round numbers in journal entries for
transactions relating to expenses. Expense account numbers begin with the number 3 for this
company .
Approach – using the “round numbers” command, obtain a frequency count.
Audit Command values
      Auditing data in Excel
                                                                                     Page 7
      worksheets
Audit Commands

          Column value – Amount
          Text Box – (empty)
          Where – [account number] like ‘3%’
Results
          A report classifying the usage of round numbers for account numbers beginning with ‘3’
The example form below is being used to prepare a round number report for the data column named
“Cost”.




    Auditing data on Excel worksheets                                                 Page 8
Audit Commands

                                         Output results
                                        Round numbers
Output results (pasted into Excel work sheet)
Round Number report:
d-stat: .003704
Digits         Count     Pct
Not Round          3,660    90.37%
             1       354     8.74%
             2        34     0.84%
             3         2     0.05%
Totals             4,050 100.00%


The report indicates that just a little under 10% of the numbers are round. The largest order of round
numbers is 3 (and there are two such numbers).
The “d-stat” value of “.003704 is a measure of the difference between the expected number of round
numbers and the actual number found. The d-stat value ranges from a low of zero (indicating conformity
with that expected) to a high of one (indicating a significant difference between observed and expected).
                                               Output results




      Auditing data in Excel
                                                                                 Page 9
      worksheets
Audit Commands



                                           Round numbers
Output results (chart)
The chart below was specified using a custom color scheme and the title shown. These values are
provided using the “Chart” tab on the processing form.




                                        Output results - chart




    Auditing data on Excel worksheets                                             Page 10
Audit Commands
    4.1.3 Benford’s Law


                                               Benford’s Law

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. The test should only be applied to numeric values which would be expected to adhere to
that expected using Benford’s Law. More information is available about Benford’s law and its use.
There are six types of tests which can be performed for Benford’s Law:


          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



Usage Example 1
In a test of physical inventory counts, determine if some of the counts may have been made up. It is
expected that actual inventory counts would follow Benford’s law, i.e. a frequency distribution of
inventory counts would align with that expected using Benford’s law. There is an allegation relating to
counts at warehouse 5713.
Approach – using the “benford” command, obtain frequencies for physical inventory counts and compare
those with that expected using benford’s law
Audit Command values
          Column value – Inventory count
          Text Box – F1
          Where – [warehouse] = 5713
Results
          Frequencies of first digits of inventory counts, along with a chart and analysis comparing the
results with that expected using benford’s law.


Usage Example 2
In a test of accounts payable, determine if particular vendor invoices have leading digit frequencies as
      Auditing data in Excel
                                                                                    Page 11
      worksheets
Audit Commands

would be expected using benford’s law. The vendors in question all have vendor numbers starting with
the letters “R” – “V”.
Approach – using the “benford” command, obtain a frequency count.
Audit Command values
        Column value – [Invoice Amount]
        Text Box – F1
        Where – [Vendor number] like ‘[R-V]%
In the example below, the auditor is testing whether the first digits of the column named cost adhere with
that expected using benford’s Law.




                                             Output results
                                             Benford’s Law




     Auditing data on Excel worksheets                                                Page 12
Audit Commands
Output results (pasted into Excel work sheet)
Benford Report
High digit           3
Chisq           730.89
p-value              0
df                   8
D-stat          0.2641
Digit        Observed Expected
           1       473    1,219
           2       432      713
           3       464      506
           4       463      392
           5       435      321
           6       419      271
           7       454      235
           8       456      207
           9       454      185
The output results include both the expected and observed vales. Both a chi squared value and a d-stat
are provided to measure the difference and assess it. Here the large chi squared value indicates that
the data values do not conform with that expected using Benford’s law. Visually, this can be confirmed
based upon the chart which is also produced and shown below.
                                           Output results




      Auditing data in Excel
                                                                                Page 13
      worksheets
Audit Commands



                                           Benford’s Law
Output results (chart)
The chart below was specified using a custom color scheme and the title shown. These values are
provided using the “Chart” tab on the processing form.




The chart indicates that the data distribution is fairly uniform (shown in the light tan) and differs
significantly from that which would be expected using Benford’s Law (shown in darker tan). The Chi
Square value is shown on the chart. Note that different chart colors and titles may be specified under
the “Chart” tab on the form.
                                           Output results - chart




     Auditing data on Excel worksheets                                                     Page 14
Audit Commands



    4.1.4 Stratify


                                              Data stratification

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.


          The values to be used for the strata (specified in ascending order and
          separated by commas or 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 ranges
          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. Do
              not include commas within a single value – e.g. specify 1000 NOT 1,000


Usage Example 1
In a test of accounts payable, classify the invoice amounts into particular ranges for the purpose of audit
planning. Invoices less than $100 do not require a secondary authorization. Invoices over $50,000
requires three authorizations. All invoices over $2,500 require a purchase order.
Approach – using the “stratify” command, obtain frequencies and totals for invoices classified into
various numeric ranges.
Audit Command values
          Column value – Inventory amount
          Text Box – -5000 -500 0 100 500 2500 30000 50000 100000
          Where – (empty)
Results
          The invoice amounts for each range specified are totaled and counted. Invoices for less than -
$5,000 or ore than $100,000 (the extreme values) are tallied separately.
Usage Example 2
      Auditing data in Excel
                                                                                       Page 15
      worksheets
Audit Commands

In a test of accounts payable, stratify the amounts of invoices for sample planning. One objective of the
analysis is to classify the amounts such that 80% of the value can be tested with one procedure and the
remaining 20% with another audit procedure. Only invoices at location ABC are to be classified.
Approach – using the “stratify” command, obtain a data stratification.
Audit Command values
          Column value – [Invoice Amount]
          Text Box – 0 500 20000 50000 100000
          Where – location = ‘ABC’
Results
          A report classifying the invoice amounts at location ‘ABC’ into the ranges specified. The results
also include a chart.




                                             Data stratification




     Auditing data on Excel worksheets                                                   Page 16
Audit Commands
Output results (pasted into Excel work sheet)
Summary for Strata       -100 0 100 200 500 1000 5000 7000 9000 12000
Start                    End         Count     Amount          Pct        Cumulative
Below                    Below               0               0          0            0
                  -100             0         0               0          0            0
                     0           100        31        1,440.00     0.0001      0.0001
                   100           200        47        7,345.99     0.0004      0.0004
                   200           500       108       39,520.48     0.0019      0.0024
                   500          1000       190      143,419.53      0.007      0.0094
                 1000           5000     1,665    5,017,302.18     0.2465      0.2559
                 5000           7000       772    4,624,456.00     0.2272      0.4831
                 7000           9000       826    6,616,229.14     0.3251      0.8082
                 9000         12000        411    3,903,915.96     0.1918            1
Above                    Above               0               0          0            1
Totals                   totals          4,050   20,353,629.28
                                            Output results




     Auditing data in Excel
                                                                               Page 17
     worksheets
Audit Commands



                                          Data stratification
Output results (chart)
The chart below was specified using a custom color scheme and the title shown. These values are
provided using the “Chart” tab on the processing form.




                                        Output results - chart




    Auditing data on Excel worksheets                                             Page 18
Audit Commands


     4.1.5 Summarization



                                           Data summarization

The summarization function obtains not only totals by each control break (sort key) 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 (sort key) 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”.

Usage Example 1
The auditor wishes to summarize sales by region and store in order to identify both the totals, as well as
the ranges of values at these stores, i.e. largest single amount and smallest single amount.
Approach – using the “summary” command, obtain totals, counts, minima, maxima, standard deviation,
average.
Audit Command values
          Column value – Sales amount
          Text Box – region, store
          Where – (empty)
Results
          The summarized amount by store by region is produced, showing also the averages, minima,
maxima, standard deviation, etc.




Usage Example 2
Expense report information is available and includes employee number, region, expense type and
expense date. The auditor wishes to summarize expense report costs , by region and employee number
for the month of June, for travel expenses only (i.e. expense type = “travel”).
Approach – using the “summary” command, obtain a data summarization.
Audit Command values

      Auditing data in Excel
                                                                                  Page 19
      worksheets
Audit Commands

          Column value – [Expense Amount]
          Text Box – Region, [employee number]
          Where – [expense type] = ‘travel’ and month([expense date]) = 6
Results
          A report summarizing all travel amounts for the month of June, by region and employee. In
addition to summaries, counts, minima, maxima, averages and standard deviations are shown.


A simpler example is shown in the example below – summarize cost by location and life. All rows are to
be summarized.




                                             Output results
                                           Data summarization




    Auditing data on Excel worksheets                                                 Page 20
Audit Commands
Output results (pasted into Excel work sheet – not all is shown)


                                                                                                   Stand-
                                                                   Minim-                          ard De-
       location            life        Total        Average         um      Maximum    Count       viation
 AB                                1         1                 1        1          1        1             1
 AB                                2         2                 2        2          2        1             1
 AB                               13        13                13       13         13        1             1
 ABC                               3       648                 3        3          3      216             0
 ABC                               4       992                 4        4          4      248             0
                                       1,285.0
 ABC                              5          0                5         5          5         257         0
                                       1,572.0
 ABC                              6          0                6         6          6         262         0
                                       1,722.0
 ABC                              7          0                7         7          7         246         0
                                       2,088.0
 ABC                              8          0                8         8          8         261         0
                                       2,115.0
 ABC                              9          0                9         9          9         235         0
                                       2,160.0
 ABC                              10         0                10       10         10         216         0
                                       2,497.0
 ABC                              11         0                11       11         11         227         0
                                       3,132.0
 ABC                              12         0                12       12         12         261         0
 CDS                               3        45                 3        3          3          15         0
 CDS                               4        60                 4        4          4          15         0
 CDS                               5        80                 5        5          5          16         0
 CDS                               6       108                 6        6          6          18         0
 CDS                               7       105                 7        7          7          15         0
 CDS                               8        96                 8        8          8          12         0
 CDS                               9       162                 9        9          9          18         0
 CDS                              10       170                10       10         10          17         0
                                                  Output results




       Auditing data in Excel
                                                                                   Page 21
       worksheets
Audit Commands



     4.1.6 Top and Bottom 10


                                     Top and Bottom 10 (Extreme values)

The Top and Bottom 10 commands are used to identify the largest (or smallest) numeric, date or text
values from a population (and criteria can be applied). The number of items to be identified can be
specified as any value. Generally the command is used to identify extremes among the following types
of data:


    •      For numeric values, identify unusually large (or small) items, possible outliers or to focus on just
           the most significant dollar items.
    •      For date values, identify the latest (or earliest) dates in order to identify date ranges, transactions
           outside the cutoff date, etc.
    •      For text values, identify high (or low) values of text as would be shown had the data been sorted.


Note that the data being analyzed does not need to be presorted. Analysis of subsets of the data can be
readily performed. For example, the auditor may wish to know the smallest fixed asset costs for those
assets with a useful life of seven years or more and located within one or more regions or states. Other
types of criteria can also be applied, depending upon what the analyst wishes to accomplish.


Usage Example 1


For purposes of audit testing, the 10 fixed assets with the largest cost need to be identified, but only for
assets located in either Florida, Alabama or Georgia.
Approach – using the “topn” command, list the details pertaining to the ten asset records having the
largest cost. Note that the input data does not need to be pre-sorted.
Audit Command values
           Column value – asset cost
           Text Box – 10
           Where – location in(‘FL’,’GA’,’AL’)
Results
           A list of the fixed asset records for the ten assets having the greatest cost in any of the three
states specified.

     Auditing data on Excel worksheets                                                       Page 22
Audit Commands
Usage Example 2
Identify the first five assets which have a net negative book value
Approach – using the “bottomn” command, list the details pertaining to the ten asset records having the
least net book value. This will include any which have a negative net book value. Note that the input
data does not need to be pre-sorted.
Audit Command values
          Column value – [asset cost] – [accumulated depreciation]
          Text Box – 5
          Where – (empty)
Results
          A list of the fixed asset records for the 5 assets having the smallest net book value (which will
include negative values if there are any).




In the example below, the auditor wishes to identify the ten asset records which have the largest cost
amounts.




                                                Output results

      Auditing data in Excel
                                                                                      Page 23
      worksheets
Audit Commands



                              Top and Bottom 10 (Extreme values)
Output results (pasted into Excel work sheet) – first ten rows in descending order (not all
columns shown)
Cost         TagNo       AD        Replace Bookval   Salvage       Depr      Life          Location
     9997        2665     4019.164      2999 5977.84      1999      803.8328           4   DFS
     9995        9747     4065.581      2998 5929.42      1999      813.1162          12   ABC
   9994.99       2204     4070.435      2998 5924.56      1999      814.0869          10   ABC
     9994        9091     4033.723      2998 5960.28      1999      806.7445          12   ABC
     9994        3619     4052.277      2998 5941.72      1999      810.4555           9   DFS
     9991        5778     4055.282      2997 5935.72      1998      811.0564           7   GSE
     9990        5461      4019.03      2997 5970.97      1998       803.806           7   ABC
     9988          879    4046.362      2996 5941.64      1998      809.2724           6   XZS
     9977        2054     4014.101      2993  5962.9      1995      802.8203           4   ABC
     9975        6887     4015.735      2992 5959.27      1995       803.147          12   ABC


The records with the largest ten asset costs are shown, listed in descending order. Note that if the data
pasted did not have column headers, then the largest values would shown in the leftmost column. For
example, if an area of six columns (with no column headers) were pasted and column three (“Col003”)
were selected, then the results would be shown with Column3 as the first column, followed by Column 1,
2, 4, 5 and 6.
                                             Output results




     Auditing data on Excel worksheets                                                 Page 24
Audit Commands


     4.1.7 Histograms



                                                Histograms

Histograms provide a visual representation for the values or transactions being analyzed. The results
are identical to that of the population statistics, and boxplot commands, except that a different chart is
produced.

Three reports are produced:

    1. Basic statistics

    2. Histogram data

    3. Percentile report
Basic 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 supporting
details to ledger amounts, testing for procedural compliance, etc. Examples of basic statistics reports
can be found in the work papers referenced below:
Usage Example 1
For purposes of audit testing, prepare a histogram of employee expense report amounts.
Approach – using the “histo” command, prepare a chart and detail report as to expense report amounts
at region XYZ.
Audit Command values
          Column value – [expense report amount]
          Text Box – (empty)
          Where – region = ‘XYZ’
Results
          A histogram chart of expense report amounts at region XYZ, along with a text report containing
the numeric values.


Usage Example 2


For purposes of testing inventory values, prepare a histogram of inventory unit cost amounts.

      Auditing data in Excel
                                                                                    Page 25
      worksheets
Audit Commands

Approach – using the “histo” command, prepare a chart and detail report as to inventory unit cost
amounts.
Audit Command values
          Column value – [inventory cost]
          Text Box – (empty)
          Where – (empty)
Results
          A histogram chart of unit inventory costs, along with a text report containing the numeric values.
          Where – (empty)
Results
          The invoice amounts for each range specified are totaled and counted. Invoices for less than -
$5,000 or ore than $100,000 (the extreme values) are tallied separately.
The example below shows a histogram of cost values is to be prepared.




                                               Output results


                                                 Histograms




    Auditing data on Excel worksheets                                                    Page 26
Audit Commands
Output results (pasted into Excel work sheet)
Histogram Report
Bin        Start     End      Count     Amount
         1         1     834        146            29,783.99
         2       834 1,667.00       332           276,601.51
         3 1,667.00 2,500.00        352           586,450.00
         4 2,500.00 3,333.00        329           826,848.02
         5 3,333.00 4,166.00        357         1,188,139.13
         6 4,166.00 4,999.00        337         1,399,458.47
         7 4,999.00 5,832.00        355         1,773,214.05
         8 5,832.00 6,665.00        325         1,895,888.28
         9 6,665.00 7,498.00        318         2,124,745.17
        10 7,498.00 8,331.00        335         2,517,380.31
        11 8,331.00 9,164.00        348         2,899,833.39
        12 9,164.00 9,997.00        516         4,835,286.96
Totals:                           4,050        20,353,629.28
The data for the histogram includes both counts and amounts. The counts are plotted on the chart which
is prepared.
                                           Output results




      Auditing data in Excel
                                                                               Page 27
      worksheets
Audit Commands



                                            Histograms
Output results (chart)
The chart below was specified using a custom color scheme and the title shown. These values are
provided using the “Chart” tab on the processing form.




This chart indicates that the most common values are those between 9,164 and 9,997. The fewest
counts are between the values of 1 and 834.
                                        Output results - chart




    Auditing data on Excel worksheets                                            Page 28
Audit Commands
    4.1.8 Box Plot


                                                   Box Plot

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. Except for the chart, the command is identical to the
Population statistics and the histogram command.
Usage Example 1


As part of an audit of accounts payable, the range of invoice costs needs to be determined.
Approach – using the “boxplot” command, prepare a chart and detail report as to invoice costs for
invoices dated after 6/30/2008.
Audit Command values
          Column value – [invoice amount]
          Text Box – (empty)
          Where – [invoice date] > #6/30/2008#
Results
          A box plot chart of invoice amounts for invoices dated after 6/30/2008, along with a text report
containing the numeric values.


Usage Example 2


Daily sales ranges needs to be determined for a particular store.
Approach – using the “boxplot” command, prepare a chart and detail report as to daily sales ranges at
store ABC.
Audit Command values
          Column value – [sales total]
          Text Box – (empty)
          Where – [store number] = ‘ABC’
Results
          A box plot chart of daily sales ranges, along with a text report containing the numeric values.
The example below will prepare a box plot of cost values for all transactions. This plot could have been
narrowed down by specifying the “Where” information.
      Auditing data in Excel
                                                                                     Page 29
      worksheets
Audit Commands




                                     Output results


                                       Box Plot




Auditing data on Excel worksheets                     Page 30
Audit Commands
Output results (pasted into Excel work sheet)
Percentiles:
P 1.0% :                        125
P 5.0% :                        542
P 10.0% :                   1,064.99
P 25.0% :                   2,579.00
P 50.0% :                   4,960.00
P 75.0% :                   7,559.00
P 90.0% :                   9,027.00
P 95.0% :                   9,503.00
P 99.0% :                   9,902.00
Inter quartile range: 4,980.00
The values above are a portion of the data as it appears when pasted into Excel. This report is the
same as that for the population statistics and the histogram commands.
                                              Output results




      Auditing data in Excel
                                                                                 Page 31
      worksheets
Audit Commands



                                              Box Plot
Output results (chart)
The chart below was specified using a custom color scheme and the title shown. These values are
provided using the “Chart” tab on the processing form.




                                        Output results - chart




    Auditing data on Excel worksheets                                             Page 32
Audit Commands
4.1.9 Random numbers

Random numbers are commonly required as part of the sampling process. Excel has a built in
function for the generation of random numbers, “=RAND()”. The Excel RAND function generates
pseudo random numbers evenly distributed between 0 and 1. For many purposes, the pseudo
random number generated using the RAND function may be adequate.


Microsoft documentation at http://support.microsoft.com/support/kb/articles/q86/5/23.asp
(knowledge base article Q86523 ) describes the process used. The starting number is
determined based upon the time of day.


The RAND function is just one of a number of random number generators (RNG). The quality of
a random number generator can be tested using the “DieHard” test suite developed by the
National Institute of Standards (NIST). More information is available at
http://csrc.nist.gov/groups/ST/toolkit/rng/batteries_stats_test.html.


One of the free random number generators is called the Mersenne Twister.


The following description is provided from Wikipedia on the Mersenne Twister

        “The Mersenne twister is a pseudorandom number generator developed in 1997

        by Makoto Matsumoto (松本 眞?) and Takuji Nishimura (西村 拓士?)[1] that is
        based on a matrix linear recurrence over a finite binary field F2. It provides for
        fast generation of very high-quality pseudorandom numbers, having been de-
        signed specifically to rectify many of the flaws found in older algorithms.

        Its name derives from the fact that period length is chosen to be a Mersenne
        prime.

        The commonly used variant of Mersenne Twister, MT19937 has the following
        desirable properties:

        1.       It was designed to have a period of 219937 − 1 (the creators of the algorithm
        proved this property). In practice, there is little reason to use a larger period, as most ap-
        plications do not require 219937 unique combinations (219937 is approximately 4.3 × 106001;


 Auditing data in Excel
                                                                                Page 33
 worksheets
Audit Commands

        this is many orders of magnitude larger than the estimated number of particles in the ob-
        servable universe, which is 1087).

        2.      It has a very high order of dimensional equidistribution (see linear congruential
        generator). This implies that there is negligible serial correlation between successive val-
        ues in the output sequence.

        3.      It passes numerous tests for statistical randomness, including the Diehard tests.
        It passes most, but not all, of the even more stringent TestU01 Crush randomness tests.


        The Mersenne Twister algorithm has received some criticism in the computer science
        field, notably by George Marsaglia. These critics claim that while it is good at generating
        random numbers, it is not very elegant and is overly complex to implement.”


        Generation of random numbers using Audit Commander is done using the “random”
        command. A seed value consisting of an integer value between 1 and 2,147,483,647 is
        used to determine the starting random number. The random numbers generated will
        consist of uniformly distributed numbers between zero and one.


Usage Example 1


        For purposes of sampling, generate and assign random numbers to each row of data
        contained on an Excel work sheet. The starting seed number to be used is 102935427.


        Command – “random”
        Column name – “N/A”
        TextBox – “102935427”


        Results – An additional column named “Random” is created with a value on the
        rightmost column between zero and 1. This is a pseudo random number generated
        using the Mersenne twister algorithm based upon the seed number provided.




                                       Random numbers


Auditing data on Excel worksheets                                                  Page 34
Audit Commands

The example command shown on the next page adds a random number value in the rightmost column.
This random number will be between 0 and 1 (exclusive). The starting number is based upon the seed
value provided (in this case 1738974 ). The seed value should be a whole number between 1 and
approximately 2.1 billion.




                                        Random numbers




      Auditing data in Excel
                                                                             Page 35
      worksheets
Audit Commands

Output results (pasted into Excel work sheet – highlighting added for effect, not all columns shown)
   Life        Location     Acquisition           Accode   DispDate     Random number
           7   DEF            5/17/2008 7:40    A                 0          0.974683138
           8   DEF                 12/19/2001   A                 0          0.961858645
          12   DEF            1/5/2008 11:31    A                 0          0.209254051
           3   DEF          10/12/2009 16:33    A                 0          0.451545258
           8   DEF          11/20/2008 11:16    A                 0          0.362094671
          10   DEF            1/31/2007 6:00    A                 0          0.010547096
           5   DEF           8/21/2010 21:21    A                 0          0.784745319
           4   DEF           3/14/2000 15:07    A                 0          0.269402404
           3   DEF              4/4/2001 8:38   A                 0          0.417646239
           3   DEF            7/31/2006 6:57    A                 0          0.578761123
           8   DEF           11/30/2008 9:07    A                 0          0.590210739
           9   DEF            1/21/2004 8:09    A                 0          0.690726882
           7   DEF           7/29/2010 23:31    A                 0          0.902005128
           8   DEF           8/12/2000 19:12    A                 0          0.361275228
           7   DEF            7/23/2002 9:07    A                 0          0.456829664
           8   DEF              5/8/2001 9:07   A                 0          0.503349514
           8   DEF           4/13/2010 15:36    A                 0          0.119554142
           9   DEF            9/9/2010 15:07    I                 0          0.602501919
           7   DEF           12/16/2003 6:57    A                 0          0.820769995
           7   DEF           6/22/2006 18:28    A                 0          0.944822744
                                             Output results




    Auditing data on Excel worksheets                                                 Page 36
Audit Commands



                4.2 Date


     4.2.1 Holiday Extract



                                               Holiday Extract

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.
Usage Example 1
In a test of general ledger, an extract of all journal postings on a federal holiday needs to be obtained.
Approach – using the “holiday” command, extract a list of all journal entries posted on holidays. The
date format being used is month – day – year (mdy).
Audit Command values
           Column value – [journal posting date]
           Text Box – mdy
           Where – (empty)
Results
           A list of any journal entry transactions which have been posted on a date which is a federal
holiday. In addition, a summary chart of holiday transactions is prepared.


Usage Example 2


Determine if any receiving reports exist for dates falling on a federal holiday. Date format is mdy.
Approach – using the “holiday” command, extract a list of receiving transactions falling on a federal
holiday.
Audit Command values

      Auditing data in Excel
                                                                                     Page 37
      worksheets
Audit Commands

          Column value – [receiving report date]
          Text Box – mdy
          Where – (empty)
Results
          A list of any receiving report transactions which occurred on a federal holiday. In addition, a
summary chart of holiday transactions is prepared.
          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 no values are specified.

The command example below checks for any records which have an acquisition date falling on a federal
holiday in the United States.




                                               Output results
                                               Holiday Extract




    Auditing data on Excel worksheets                                                     Page 38
Audit Commands
Output results (pasted into Excel work sheet – not all rows and columns are shown, highlighting added
for emphasis)
AcqDate        TagNo    Cost      AD        Replace Bookval   Salvage             Depr
    11/24/2005     1939      6199 2539.986       1860 3659.01      1240            507.9973
     1/17/2005     4982      8649 3488.15        2595 5160.85      1730              697.63
     1/17/2005     4759      8649 3488.15        2595 5160.85      1730              697.63
     5/28/2007     3740      4993 2040.753       1498 2952.25       999            408.1506
      7/4/2005     2392      9223 3728.142       2767 5494.86      1845            745.6284
      1/2/2006     3543      4267 1726.003       1280   2541        853            345.2006
     10/9/2006     2344      7175 2929.244       2152 4245.76      1435            585.8487
      1/2/2006     4754      9473     8400       2842   1073       1895                1680
    11/24/2005     4887      9867 4009.78        2960 5857.22      1973             801.956
     2/19/2007     2035      1615    654.74       484  960.26       323             130.948
    11/10/2006     4215      3776 1521.438       1133 2254.56       755            304.2876
    10/10/2005     3475      9503 3845.354       2851 5657.65      1901            769.0709
      1/1/2007     3166      7941 3240.535       2382 4700.46      1588            648.1071
    11/11/2004     3197      2179 889.3601        654 1289.64       436             177.872
     2/19/2007     1224      3424 1375.961       1027 2048.04       685            275.1921
    12/31/2004     1353      3912     2920       1174    992        782                 584
     2/19/2007     4232      4544 1835.211       1363 2708.79       909            367.0423
     2/20/2006     4194      3068 1251.079        920 1816.92       614            250.2158
    12/31/2004     4107      1785 714.4909        536 1070.51       357            142.8982
    12/25/2006     5243      1518 614.6649        455  903.34       304             122.933
      9/4/2006     5193      6506 2652.665       1952 3853.33      1301            530.5331
                                            Output results




     Auditing data in Excel
                                                                               Page 39
     worksheets
Audit Commands



                                          Holiday Summary
Output results (chart)
The chart below was specified using a custom color scheme and the title shown. These values are
provided using the “Chart” tab on the processing form.




This chart indicates that the most frequent holiday for asset acquisitions was President’s Day (19
instances).
                                         Output results - chart




    Auditing data on Excel worksheets                                                 Page 40
Audit Commands


     4.2.2 Week days


                                                 Week days

In 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.
Usage Example 1


In a test of certain expense, an extract is needed for expenses incurred on a Friday or Saturday.
Approach – using the “wd” command, extract a list of all such transactions. The date format being used
is month – day – year (mdy).
Audit Command values
          Column value – [expense date]
          Text Box – Friday, saturday
          Where – (empty)
Results
A list of any expense transactions which fell on a Friday or Saturday are prepared.


Usage Example 2
An audit test is to be performed to identify any travel expense transactions on Saturdays, which is not
allowed at this company.
Approach – using the “wd” command, extract a list of all such transactions. The date format being used
is month – day – year (mdy).
Audit Command values
          Column value – [expense date]
          Text Box –Saturday
          Where – [travel code] = ‘airline’
Results
          A list of any expense transactions which fell on a Saturday is prepared.
The day of the week must include at least the first three letters of the week day name. case does not
matter. Thus, Sunday could be specified using any of the following: “sun”, “Sunday”, “sund”, etc.
The example below is used to extract all transactions which fall on either a Saturday or a Monday. Note
that additional selection criteria could have been applied, e.g. store = ‘ABC’ to isolate the extract to just
      Auditing data in Excel
                                                                                     Page 41
      worksheets
Audit Commands

those transactions at store ‘ABC’. Similarly a date range could have also been applied, e.g. acqdate
between #7/1/2005# and #9/30/2005#. When specifying dates as part of the extract criteria, the date
value must be enclosed in pound signs (‘#’).




                                               Output results
                                                Week days




    Auditing data on Excel worksheets                                                Page 42
Audit Commands
Output results (pasted into Excel work sheet – not all rows and columns are shown)
AcqDate          TagNo    Cost       AD       Replace Bookval   Salvage     Depr       Life
       5/26/2007     2547       8258 3346.594      2477 4911.41      1652    669.3188          9
        3/4/2006     1299      -3115 1253.43        934 1861.57       623    250.6859         12
        3/6/2006     2881       2244 905.4028       673  1338.6       449    181.0806          8
       3/17/2007     2791       3039     2431       912     608       608        761.4        12
      12/19/2005     4163       3048 1223.804       914  1824.2       610    244.7607          4
        4/8/2006     5205       1165      932       350     233       233    95.43749          8
       7/10/2006     4219       2500 1022.871       750 1477.13       500    204.5741          3
       6/24/2006     3112       1131 460.5792       339  670.42       226    92.11584          3
       2/26/2005     1921       7527 3033.435      2258 4493.57      1505    606.6869          4
       9/19/2005     4857       6106 2448.247      1832 3657.75      1221    489.6493          9
        5/2/2005     2391       4339 1745.635      1302 2593.37       868    349.1269          8
       7/17/2006     2205       7858 3195.106      2357 4662.89      1572    639.0212          5
       1/20/2007     1639       7073 2870.923      2122 4202.08      1415    574.1847          6
       4/16/2007     4964       2410 975.3022       723  1434.7       482    195.0604          7
       6/19/2006     4185       6705 2715.957      2012 3989.04      1341    543.1915          4
       9/18/2006     4673       7966 3233.326      2390 4732.67      1593    646.6653          3
       11/6/2006     3363       6586 2658.405      1976  3927.6      1317    531.6809          3
       1/17/2005     4982       8649 3488.15       2595 5160.85      1730      697.63          9
       1/27/2007     1501        521 208.4521       156  312.55       104    41.69043         12
       3/28/2005     3965       1775 715.3794       532 1059.62       355    143.0759         10
       1/17/2005     4759       8649 3488.15       2595 5160.85      1730      697.63          9
       1/27/2007     3743        521 208.4521       156  312.55       104    41.69043         12
       3/28/2005     5045       1775 715.3794       532 1059.62       355    143.0759         10
      11/22/2004     1870       2589 1060.414       777 1528.59       518    212.0829          6
       12/5/2005     3391        795 322.078        238  472.92       159     64.4156          5
      12/11/2006     5140       4897 1989.455      1469 2907.55       979     397.891          6
        5/7/2005     2589       5555 2229.728      1666 3325.27      1111    445.9457         10
                                        Output results




     Auditing data in Excel
                                                                         Page 43
     worksheets
Audit Commands


     4.2.3 Holiday summary



                                              Holiday Summary

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.


Usage Example 1


In a test of general ledger, an extract of all journal postings on a federal holiday needs to be obtained.
Approach – using the “holiday” command, extract a list of all journal entries posted on holidays. The
date format being used is month – day – year (mdy).
Audit Command values
           Column value – [journal posting date]
           Text Box – mdy
           Where – (empty)
Results
           A list of any journal entry transactions which have been posted on a date which is a federal
holiday. In addition, a summary chart of holiday transactions is prepared.


Usage Example 2


Determine if any receiving reports exist for dates falling on a federal holiday. Date format is mdy.
Approach – using the “holiday” command, extract a list of receiving transactions falling on a federal
holiday.
Audit Command values
           Column value – [receiving report date]
           Text Box – mdy
           Where – (empty)


Results

     Auditing data on Excel worksheets                                                      Page 44
Audit Commands
       A list of any receiving report transactions which occurred on a federal holiday. In addition, a
summary chart of holiday transactions is prepared.
       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.




                                         Output results
                                        Holiday Summary
Output results (pasted into Excel work sheet)
Holidays:
New Year's                        14
Martin Luther King                13
President's Day                   19
Memorial Day                      14
Independence Day                   9
Labor Day                          8
Columbus Day                       7
Veterans Day                       8
Thanksgiving                       9
Christmas                         16
                                             Output results
     Auditing data in Excel
                                                                                  Page 45
     worksheets
Audit Commands




Auditing data on Excel worksheets                    Page 46
Audit Commands



                                          Holiday Summary
Output results (chart)
The chart below was specified using a custom color scheme and the title shown. These values are
provided using the “Chart” tab on the processing form.




                                        Output results - chart




      Auditing data in Excel
                                                                             Page 47
      worksheets
Audit Commands


     4.2.4 Ageing


                                                  Ageing

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:
          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”
          The   name of the column with the amount to be aged, e.g. “Balance Due”



Usage Example 1
In a test of accounts receivable, an ageing of customer account balances is needed.
Approach – using the “age” command, prepare an ageing report for customers in ABC region. Ageing is
to be done as of June 30, 2008. Ageing width is 30 days.
Audit Command values
          Column value – [invoice date]
          Text Box – invoice date, invoice amount, 6/30/2008, mdy
          Where – region = ‘ABC’
Results
          An ageing report is prepared for those customer in region ABC as of June 30, 2008.


Usage Example 2


In a test of accounts payable, an ageing of vendor invoices is needed.
Approach – using the “age” command, prepare an ageing report for vendor invoices. Ageing is to be
done as of September 30, 2007. Ageing width is 30 days.
Audit Command values
          Column value – [invoice date]
          Text Box – invoice date, invoice amount, 6/30/2007, mdy
          Where – (empty)
Results
          An ageing report is prepared for vendor invoices as of September 30, 2007.

     Auditing data on Excel worksheets                                                 Page 48
Audit Commands




                          Output results


                             Ageing




Auditing data in Excel
                                           Page 49
worksheets
Audit Commands

Output results (pasted into Excel work sheet)
Ageing Report as of      6/30/2005
Start            End                 Amount
       5/31/2005         6/29/2005        653,891.00
       6/30/2005         7/29/2005        664,956.00
       7/30/2005         8/28/2005        681,971.00
       8/29/2005         9/27/2005        579,429.00
       9/28/2005        10/27/2005        602,309.00
      10/28/2005        11/26/2005        671,547.00
      11/27/2005        12/26/2005        669,969.00
      12/27/2005         1/25/2006          85,773.00
Totals                                  4,609,845.00
                                            Output results




    Auditing data on Excel worksheets                        Page 50
Audit Commands

                                              Ageing
Output results (chart)
The chart below was specified using a custom color scheme and the title shown. These values are
provided using the “Chart” tab on the processing form.




                                        Output results - chart




      Auditing data in Excel
                                                                             Page 51
      worksheets
Audit Commands



     4.2.5 Date Near

                                                   Date Near

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)


Usage Example 1
For cutoff testing, the auditor wants to identify any sales made within 5 days of June 30, 2008.
Approach – using the “datenear” command, prepare a list of any such transactions.
Audit Command values
          Column value – [sales date]
          Text Box – 6/30/2008, 5
          Where – (empty)
Results
          A list of any sales transactions within five days of June 30, 2008, i.e. June 25, 2008 – July 5,
2008.


Usage Example 2


For accrual testing, the auditor wants to identify any accruals posted within 15 days of June 30, 2008.
Only account numbers beginning with either a ‘2’ or a ‘3’ are to be selected.
Approach – using the “datenear” command, prepare a list of any such transactions.
Audit Command values
          Column value – [journal date]
          Text Box – 6/30/2008, 15
          Where – [account number] like ‘[2-3]%’
Results
          A list of any accruals posted within 15 days for the account numbers specified.


     Auditing data on Excel worksheets                                                     Page 52
Audit Commands
Note: The default values: US and mdy will be used if nothing is specified.

         The target date value, and
         The maximum number of days before or after this date




                                                      Output results


                                           Date near
Output results (pasted into Excel work sheet – doesn’t show all rows or columns)
TagNo      Cost          AD        Replace Bookval   Salvage     Depr      Life       Location   Acquisition              Accode
     840          6032    2421.711      1810 3610.29      1206    484.3423        3   DEF               7/31/2006 6:57    A
    4615          6166    2526.535      1850 3639.46      1233     505.307        8   ABC               8/2/2006 11:02    A
    2145          6094     2475.97      1828 3618.03      1219     495.194        4   DFS               7/26/2006 0:43    A
    1298          6144    2512.487      1843 3631.51      1229    502.4973        3   ABC              7/29/2006 12:14    A
     108          6042    2430.326      1813 3611.67      1208    486.0651        8   ABC              7/30/2006 16:04    A
    4426          6105    2475.607      1832 3629.39      1221    495.1214        7   ABC                 8/4/2006 9:21   I
                                                      Output results




        Auditing data in Excel
                                                                                                    Page 53
        worksheets
Audit Commands



    4.2.6 Date Range



                                                  Date Range

The date range test is the same as “date near”, except specific dates are provided.


Usage Example 1


For cutoff testing, the auditor wants to identify any sales made between 6/25/2008 and 7/5/2008.
Approach – using the “daterange” command, prepare a list of any such transactions.
Audit Command values
          Column value – [sales date]
          Text Box – 6/25/2008, 7/5/2008
          Where – (empty)
Results
          A list of any sales transactions within the specified range, i.e. June 25, 2008 – July 5, 2008.


Usage Example 2


For accrual testing, the auditor wants to identify any accruals posted within 15 days of June 30, 2008.
Only account numbers beginning with either a ‘2’ or a ‘3’ are to be selected.
Approach – using the “daterange” command, prepare a list of any such transactions.
Audit Command values
          Column value – [journal date]
          Text Box – 6/15/2008, 7/14/2008
          Where – [account number] like ‘[2-3]%’
Results
          A list of any accruals posted within 15 days for the account numbers specified.




    Auditing data on Excel worksheets                                                      Page 54
Audit Commands




                                         Output results
                                          Date range
Output results (pasted into Excel work sheet – doesn’t include all columns)
Acquisition        TagNo     Cost     AD        Replace Bookval   Salvage      Depr
   7/31/2006 6:57        840      6032 2421.711      1810 3610.29      1206     484.3423
  8/11/2006 21:07      4919       6103 2466.12       1831 3636.88      1221      493.224
   8/2/2006 11:02      4615       6166 2526.535      1850 3639.46      1233      505.307
   8/10/2006 5:16      4376       6040 2417.777      1812 3622.22      1208     483.5554
     8/8/2006 3:50     2149       6073 2445.843      1822 3627.16      1215     489.1685
     8/4/2006 9:21     4426       6105 2475.607      1832 3629.39      1221     495.1214
  8/11/2006 21:21      7053       6158 2510.114      1847 3647.89      1232     502.0229
   8/10/2006 9:50      9235       6113 2475.591      1834 3637.41      1223     495.1182
                                         Output results



     Auditing data in Excel
                                                                          Page 55
     worksheets
Audit Commands




    4.2.7 Week days Report


                                           Week days report

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.
Usage Example 1


In an audit of expense reports, the counts of expenses by day of week are needed.
Approach – using the “wdreport” command, summarize such transactions.
Audit Command values
          Column value – [expense report date]
          Text Box – mdy
          Where – (empty)
Results
          A summary of counts of expense report transactions by day of week.


Usage Example 2


In an audit of purchasing, the counts of purchase orders issued by day of week are needed.
Approach – using the “wdreport” command, summarize such transactions.
Audit Command values
          Column value – [purchase order date]
          Text Box – mdy
          Where – (empty)
Results
          A summary of counts of purchase order transactions by day of week.
          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.



    Auditing data on Excel worksheets                                                     Page 56
Audit Commands




                                         Output results
                                        Week days report
Output results (pasted into Excel work sheet)
Weekday analysis:
Sunday:                           539
Monday:                           575
Tuesday:                          514
Wednesday:                        588
Thursday:                         551
Friday:                           583
Saturday:                         536
                                         Output results




     Auditing data in Excel
                                                           Page 57
     worksheets
Audit Commands



                                          Weekdays report
Output results (chart)
The chart below was specified using a custom color scheme and the title shown. These values are
provided using the “Chart” tab on the processing form.




The chart indicates that the most common day of the week for the transactions selected was
Wednesday and the least frequent day of the week was Tuesday.
                                      Output results - chart




    Auditing data on Excel worksheets                                              Page 58
Audit Commands



             4.3 Other


    4.3.1 Gaps in Sequences


                                       Numeric Sequence Gaps



A 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.
Usage Example 1
A check is to be made to determine if all asset tag numbers are accounted for. The purpose of the test
id to determine if there are any “gaps” in the numbers assigned for fixed asset tags. No records are to be
excluded. The name of the column for the fixed asset tag number is “Tagno”. The command box to
perform this test would be as shown below.




Usage Example 2

      Auditing data in Excel
                                                                                 Page 59
      worksheets
Audit Commands

In an audit of cash, the auditor wishes to determine of the schedule of checks paid is complete, i.e. are
there any missing check numbers which have not been accounted for? The commands to perform this
test are shown below. Notre that the name of the column which contains the check numbers is called
“Check Number”. All of the data is to be tested, i.e. there are no exclusions for testing, so the “Where”
box is blank. This command does not require any other information, so that box is also blank.




                                             Output results


                                        Numeric Sequence Gaps




    Auditing data on Excel worksheets                                                   Page 60
Audit Commands
Output results (pasted into Excel work sheet – not all of the report is shown)
Gaps: Count: 2217 Missing: 6642
        3          6                     2
        9         14                     4
       15         18                     2
       19         22                     2
       22         25                     2
       25         29                     3
       29         32                     2
       33         35                     1
       35         37                     1
       37         42                     4
       43         47                     3
       49         51                     1
       52         56                     3
       56         59                     2
       59         62                     2
       62         64                     1
       64         66                     1
       66         70                     3
       70         73                     2
This report indicates that for the sequence tested, there were 2,217 gaps which consisted on 6,642
instances of missing numbers.
                                             Output results




      Auditing data in Excel
                                                                                Page 61
      worksheets
Audit Commands



4.3.2 Data Extraction


Data extraction is a very common audit procedure whose purpose is to narrow down the
transactions or other data which needs to be tested. Only two pieces of information are required
– the name of the command which is selected from the drop down list (“Data extraction”) and the
specific instructions which are contained in the “Other Info” column.


There are many available commands for performing data extraction and they are described in
more detail in Chapter 7. In the first example, the audit wishes to extract fixed asset records for
those assets which were acquired during the fiscal year ended June 30, 2008, i.e. July 1, 2997 –
June 30, 2008. The name of the column for the acquisition date is named “acquisition date”.


Example 1




Note that because the column name contains an embedded space, it must be enclosed in
brackets.




Auditing data on Excel worksheets                                                  Page 62
Audit Commands
Usage Example 2


In the second example, the auditor wishes to test for a possible error condition. Few assets with
a useful life of more than 10 years would have a cost of less than $1,000. The auditor wishes to
run an extract to see if there are any such records.




In some cases, the syntax needed for the command may not be obvious. There is a “help”
facility available by clicking on the label named “Where?”. This brings up a form of examples,
where a command similar to that needed may be selected and edited.




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




                                        Data Extraction




 Auditing data in Excel
                                                                            Page 63
 worksheets
Audit Commands




                                     Output results




Auditing data on Excel worksheets                     Page 64
Audit Commands

                                         Data Extraction
Output results (pasted into Excel work sheet – not all is shown)




This is a schedule of all assets which have been over depreciated, i.e. cost less accumulated
depreciation exceeds salvage.
                                            Output results




      Auditing data in Excel
                                                                                Page 65
      worksheets
Audit Commands



     4.3.3 Duplicates


                                                  Duplicates

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.


Usage Example 1
The first example is a test performed as part of an accounts payable audit. A potential duplicate invoice
is defined as one which has the same vendor number, invoice number and invoice date. The test is
performed using the commands shown below.




The command text in the “Other info” is simply the column names separated by commas:


Results
          A schedule of potential duplicate invoices, using the specification provided.


Usage Example 2


     Auditing data on Excel worksheets                                                    Page 66
Audit Commands

In an audit of fixed assets, an audit objective is to determine the accuracy of the records by checking for
duplicate asset tag numbers. Tag numbers should be unique within any single location. However, there
are certain “generic” tag numbers which begin with the letter “A” and these tag numbers should not be
tested.
The test is performed using the commands shown below.




The command text in the “Other info” is simply the column names separated by commas:




                                              Output results
                                               Duplicates




      Auditing data in Excel
                                                                                   Page 67
      worksheets
Audit Commands

Output results (pasted into Excel work sheet – not all rows and columns are shown, highlighting
added for emphasis)
location   tagno         Cost          AD        Replace Bookval   Salvage     Depr
ABC                 19          5766    2357.063      1730 3408.94      1153    471.4125
ABC                 19          2575    1042.965       772 1532.03       515    208.5931
ABC                 56          3888    1568.307      1166 2319.69       778    313.6614
ABC                 56          7557    3036.653      2267 4520.35      1511    607.3306
ABC                110          2735    1102.043       820 1632.96       547    220.4085
ABC                110          5214     2101.48      1564 3112.52      1043    420.2959
ABC                122          8814    3527.223      2644 5286.78      1763    705.4446
ABC                122          2040    826.3205       612 1213.68       408    165.2641
ABC                139          7391    2966.962      2217 4424.04      1478    593.3925
ABC                139          2425    978.3281       728 1446.67       485    195.6656
ABC                233          8410    3424.003      2523   4986       1682    684.8005
ABC                233          4463        3570      1339    893        893    357.7068
ABC                258          2704    1098.159       811 1605.84       541    219.6318
ABC                258          8965    3620.646      2690 5344.35      1793    724.1293
ABC                402          6213    2531.266      1864 3681.73      1243    506.2532
ABC                402          4365    1771.483      1310 2593.52       873    354.2965
ABC                418          2952    1187.545       886 1764.46       590    237.5089
ABC                418          6729    2728.152      2019 4000.85      1346    545.6304
ABC                441          7380    3014.342      2214 4365.66      1476    602.8683
ABC                441          7263    2970.587      2179 4292.41      1453    594.1173
ABC                520          6359    2567.103      1908  3791.9      1272    513.4206
ABC                520          8120    3297.159      2436 4822.84      1624    659.4317
ABC                556          1198    486.1772       359  711.82       240    97.23544
ABC                556          3849    1576.375      1155 2272.63       770    315.2749
ABC                560          3209    1287.226       963 1921.77       642    257.4452
                                                Output results




    Auditing data on Excel worksheets                                                Page 68
Audit Commands


     4.3.4 Same, Same, Different



                                           Same, Same, Different

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.
The test is performed using the names of the columns to be tested.
          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).



Usage Example 1
In an audit of accounts payable, test for the unusual situation described above.
Approach – using the “ssd” command, analyze the transactions.
Audit Command values
          Column value – [blank]
          Text Box – [Vendor Number],[Invoice Number],[Invoice date],[Invoice
Amount]
          Where – (empty)
Results
          A schedule of any transaction pairs which have the same vendor number, invoice number,
invoice date, but a different invoice amount.


Usage Example 2


In an audit of payroll transactions, check for any pair of records which have the same employee last

      Auditing data in Excel
                                                                                   Page 69
      worksheets
Audit Commands

name, same employee first name, same street address, but different employee numbers. Tests are to
be made only for those employees in Florida, Georgia and Alabama.
Approach – using the “ssd” command, analyze such transactions.
Audit Command values
          Column value – [empty]
          Text Box – [last name],[first name], [street address], [employee number]
          Where –state in (‘FL’,’GA’,”AL’)
Results
Schedule of any such records identified.


The example below illustrates the procedure for identifying instances of fixed asset records which have
the same tag number but a different location.




                                                Output results
                                             Same, Same, Different




    Auditing data on Excel worksheets                                                Page 70
Audit Commands
Output results (pasted into Excel work sheet – emphasis added, not all rows and columns
shown)
location   tagno         cost          AD        Replace Bookval   Salvage     Depr
ABC                 19          2575    1042.965       772 1532.03       515    208.5931
ABC                 19          5766    2357.063      1730 3408.94      1153    471.4125
ABC                 56          3888    1568.307      1166 2319.69       778    313.6614
ABC                 56          7557    3036.653      2267 4520.35      1511    607.3306
ABC                110          2735    1102.043       820 1632.96       547    220.4085
ABC                110          5214     2101.48      1564 3112.52      1043    420.2959
ABC                122          2040    826.3205       612 1213.68       408    165.2641
ABC                122          8814    3527.223      2644 5286.78      1763    705.4446
ABC                139          2425    978.3281       728 1446.67       485    195.6656
ABC                139          7391    2966.962      2217 4424.04      1478    593.3925
ABC                233          4463        3570      1339    893        893    357.7068
ABC                233          8410    3424.003      2523   4986       1682    684.8005
ABC                258          2704    1098.159       811 1605.84       541    219.6318
ABC                258          8965    3620.646      2690 5344.35      1793    724.1293
ABC                402          4365    1771.483      1310 2593.52       873    354.2965
ABC                402          6213    2531.266      1864 3681.73      1243    506.2532
ABC                418          2952    1187.545       886 1764.46       590    237.5089
ABC                418          6729    2728.152      2019 4000.85      1346    545.6304
ABC                441          7263    2970.587      2179 4292.41      1453    594.1173
ABC                441          7380    3014.342      2214 4365.66      1476    602.8683
ABC                520          6359    2567.103      1908  3791.9      1272    513.4206
ABC                520          8120    3297.159      2436 4822.84      1624    659.4317
ABC                556          1198    486.1772       359  711.82       240    97.23544
ABC                556          3849    1576.375      1155 2272.63       770    315.2749
ABC                560          3209    1287.226       963 1921.77       642    257.4452
This schedule shows those assets which have the same location and tag number, but a different cost
amount.
                                                Output results




     Auditing data in Excel
                                                                                 Page 71
     worksheets
Audit Commands



4.3.5 Trend Lines

The system provides for four primary types of trend line analysis:




Briefly, the tests perform the following procedures:


      Menu name for test                                      Description
Regression Best Fit                   Performs a basic “best fit” linear regression and reports the
                                      results as text file. Uses a single column of data for the
                                      regression.
Trend Line                            Most flexible type of regression analysis, as it can
                                      summarize or aggregate data prior to plotting. Handles
                                      various periods, as well as various summarization
                                      functions.
Confidence Band (summarize            Expects time line data, with a column for year, column for
data)                                 month, X-axis amount, Y-axis amount
Confidence Band                       Expects an identifier, an X-value and a Y-value
Regression best fit


                                           Trend lines


Auditing data on Excel worksheets                                                  Page 72
Audit Commands

The purpose of the trend line procedure is to perform a “best fit” 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.
Usage Example 1
Comparative income statements exists for the last five years. In this test, a trend analysis on the Sales
amounts will be performed. (The amounts shown are actual from a Standard and Poors report for a
Fortune 500 company.




Since the data is in horizontal format, the check box “Rows” is checked before the data is copied from
Excel and pasted into the form.




      Auditing data in Excel
                                                                                   Page 73
      worksheets
Audit Commands

                                              Output results
                                               Trend Line
Output results show the basic trend line information – intercept, slope and correlation coefficient.




The slope is negative because the information goes back in time. The correlation of 83% indicates a
fairly consistent trend over time.

                                              Output results




     Auditing data on Excel worksheets                                                  Page 74
Audit Commands
    4.3.6 Time Line analysis

                                              Time line analysis

The purpose of the timeline analysis command is summarize and chart key information from transaction
data over a time period in order to see underlying trends or to identify potential anomalies or errors.
Built into the functionality is the ability to “drill down” using various criteria and also to view the
summarized information using various measures such as counts, totals, averages, etc. Output is a
detail report which identifies potential variances, as well as a chart so that the summarized information
may be more easily viewed.
To run the analysis, five pieces of information are needed:
               1. Name of the date column to be used, i.e. the name of the column which contains the
                    transaction date to be used for the analysis.
               2. Name of the amount column, i.e. the column containing the numeric information
                    being analyzed
               3. The time interval to be used for the analysis, specified as a single letter, and which
                    must be one of the following:
                    a. monthly, specified using ‘m’
                    b. quarterly, specified using ‘q’
                    c. annually, specified using ‘y’
                    d. weekly, specified using ‘w’
                    e. daily, specified using ‘d’
           4. The type of metric to be applied, which must be one of the following:
                    a. summary, specified as ‘sum’,
                    b. count, specified as ‘count’
                    c. average, specified as ‘avg’,
                    d. minimum value, specified as ‘min’
                    e. maximum value, specified as ‘max’,
                    f. standard deviation, specified as ‘stdev’
           5. The confidence level, a number between 0 and 1. The default value is .95, i.e. a 95%
                confidence level




 With this information, the system will aggregate the data using the time period specified and the type of
 aggregation desired. The results will be written out as a text file and also plotted on a chart.
     Auditing data in Excel
                                                                                       Page 75
     worksheets
Audit Commands

Usage Example 1
In an audit of accounts payable, the auditor wishes to see a trend as to invoice totals for a specified
vendor, by quarter, in order to view the overall trend and to see if there may be any unusual items such
as “spikes”, missing data, etc.
The date column to be used is called “invoice date”, and the amount column to be analyzed is called
“invoice amount”. Tests are to be done at a 95% confidence level. The command would be as follows:
[invoice date], [invoice amount], q, sum, .95
Usage Example 2
Continuing with the same example, the auditor now wants to see transaction counts by month. The
command would then be as follows:
[invoice date], [invoice amount], m, count, .95




The command box above performs a time line analysis of asset acquisitions using the “cost” column,
and specifying a period of “q” (quarterly) with a precision of 95%.
The chart produced is shown below.




   Auditing data on Excel worksheets                                                   Page 76
Audit Commands




The chart indicates that there were few or no asset acquisitions prior to the first quarter of 2004. To
get a more representative picture, the procedure can be re-run, specifying just asset acquisitions made
after January 1, 2004.




                  Running this procedure produces the following chart:
    Auditing data in Excel
                                                                                  Page 77
    worksheets
Audit Commands




                                      Output results
                                    Time line analysis




Auditing data on Excel worksheets                        Page 78
Audit Commands
A chart is produced which shows the invoices totaled by quarter and plotted as a trend line.




There is also a text report which has all the details. Below is that data imported into Excel.



                                              Output results




      Auditing data in Excel
                                                                                   Page 79
      worksheets
Audit Commands

Linear regression report:
Equation: y = b + mx
Intercept: 1,749,261.72
Slope:21,191.67
Correlation: 1%
Precision: 0.95

                                                              Lower       Lower                    Upper        Upper
Desc                        X        Y           Predicted    Prediction Confidence     Predicted Confidence Prediction
2002-01                          1     237,272      1,770,453   1,770,447   1,770,449    1,770,453    1,770,458    1,770,460
2002-02                          2   1,788,596      1,791,645   1,791,639   1,791,641    1,791,645    1,791,649    1,791,651
2002-03                          3   2,742,676      1,812,837   1,812,831   1,812,833    1,812,837    1,812,840    1,812,842
2002-04                          4   4,232,764      1,834,028   1,834,023   1,834,026    1,834,028    1,834,031    1,834,034
2003-01                          5     736,504      1,855,220   1,855,215   1,855,218    1,855,220    1,855,222    1,855,225
2003-02                          6   1,547,613      1,876,412   1,876,407   1,876,410    1,876,412    1,876,413    1,876,417
2003-03                          7   1,840,285      1,897,603   1,897,599   1,897,602    1,897,603    1,897,605    1,897,608
2003-04                          8   3,446,882      1,918,795   1,918,790   1,918,794    1,918,795    1,918,796    1,918,800
2004-01                          9     343,401      1,939,987   1,939,982   1,939,985    1,939,987    1,939,988    1,939,991
2004-02                         10   1,631,899      1,961,178   1,961,174   1,961,177    1,961,178    1,961,180    1,961,183
2004-03                         11   1,345,257      1,982,370   1,982,365   1,982,368    1,982,370    1,982,372    1,982,375
2004-04                         12   3,621,404      2,003,562   2,003,556   2,003,559    2,003,562    2,003,565    2,003,567
2005-01                         13     376,953      2,024,753   2,024,748   2,024,750    2,024,753    2,024,757    2,024,759
2005-02                         14   2,130,685      2,045,945   2,045,939   2,045,941    2,045,945    2,045,949    2,045,951
2005-03                         15   2,759,735      2,067,137   2,067,130   2,067,132    2,067,137    2,067,141    2,067,143


     Queries can now be further refined. The next query obtains the same information by month,
     changing only the period parameter from a ‘q’ to an ‘m’.




     The results showing monthly amounts are below:




     Auditing data on Excel worksheets                                                                 Page 80
Audit Commands




Auditing data in Excel
                                          Page 81
worksheets
Audit Commands



     4.3.7 Confidence Band

                                               Confidence Band

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.
Usage Example 1


In an audit of transportation expenses, there is a need to determine if there is a linear relationship
between mileage and annual maintenance expenses
Approach – using the “confband” command, test such a relationship.
Audit Command values
          Column value –N/A
          Text Box – county, mileage, expense, 90
          Where – (empty)
Results
          A trend line chart with confidence and prediction intervals for the linear relationship.




The results are shown below.


     Auditing data on Excel worksheets                                                      Page 82
Audit Commands




The chart shows that there is a fair overall correlation between the data. (86.3%). However, for one data
point the repair costs are well outside the expected range. This might be an area the auditor could focus
on.

                                            Output results
                                           Confidence Band




      Auditing data in Excel
                                                                                 Page 83
      worksheets
Audit Commands

Output results (pasted into Excel work sheet – emphasis added, formatting performed for clarity)
Linear regression report:
Equation: y = b + mx
Intercept: 5505.15584475063
Slope:6.61707235425678E-02
Correlation: 35%
Precision: 0.9
      Desc             X          Y    Predicted
                                              Lower PredictionConfidence
                                                       Lower         Predicted
                                                                           Upper Confidence
                                                                                         Upper Prediction Comment
Wake               19,758.00   6,737.81 6,812.56 -1,028.65 -1,027.45 6,812.56 14,652.56         14,653.76
Mecklenberg        14,097.00   6,248.66 6,437.96 3,231.92 3,234.85 6,437.96 9,641.08             9,644.01
New Hanover        12,518.00   6,180.84 6,333.48 4,418.72 4,423.63 6,333.48 8,243.33             8,248.24
Johnston           12,121.00   6,231.25 6,307.21 4,716.58 4,722.49 6,307.21 7,891.93             7,897.84
Person             11,838.00   6,208.12 6,288.48 4,928.60 4,935.52 6,288.48 7,641.45             7,648.37 observed greater
                                                                                                          than upper
                                                                                                          predictionobserved
                                                                                                          greater than upper
Dansbury          7,957.00     8,213.17 6,031.68 4,199.87 4,205.00 6,031.68 7,858.35             7,863.48 confidence
Smythe           18,731.00     6,623.40 6,744.60   -255.53    -254.19 6,744.60 13,743.39        13,744.73
Jackson           2,465.00     5,488.28 5,668.27   -658.25    -656.76 5,668.27 11,993.30        11,994.78
Gregory          14,380.00     6,323.13 6,456.69 3,019.05 3,021.78 6,456.69 9,891.60             9,894.33
Altenberg        13,612.00     6,330.88 6,405.87 3,596.66 3,600.00 6,405.87 9,211.74             9,215.08
Jamestown        16,769.00     6,691.96 6,614.77 1,221.32 1,223.06 6,614.77 12,006.49           12,008.23
Flurry            1,880.00     5,430.37 5,629.56 -1,176.03 -1,174.65 5,629.56 12,433.76         12,435.14
Snow             15,366.00     6,443.21 6,521.94 2,277.20 2,279.41 6,521.94 10,764.46           10,766.67
Bear                790.00     5,307.48 5,557.43 -2,140.82 -2,139.60 5,557.43 13,254.46         13,255.68
Rugged            3,488.00     5,615.62 5,735.96    247.16     248.87 5,735.96 11,223.05        11,224.76
PineLake          4,154.00     5,691.17 5,780.03    836.55     838.45 5,780.03 10,721.60        10,723.50
FireStorm         3,083.00     5,427.82 5,709.16   -111.28    -109.67 5,709.16 11,527.99        11,529.60
                                                                                                          observed less than
Fern Valley      10,354.00     6,032.78 6,190.29 5,993.84 6,049.51 6,190.29 6,331.06             6,386.73 lower confidence
                                                       Output results




     Auditing data on Excel worksheets                                                                  Page 84
Audit Commands



     4.3.8 Confidence Band (Time Series)


                                         Confidence Band (Time Series)

The purpose of the confidence band (time series) 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.
Usage Example 1
In an audit of transportation expenses, there is a need to determine if there is a linear relationship
between mileage and annual maintenance expenses
Approach – using the “confband2” command, test such a relationship.
Audit Command values
          Column value –N/A
          Text Box – year, month, x, y
          Where – (empty)
Results
          A trend line chart over time with confidence and prediction intervals for the linear relationship.




      Auditing data in Excel
                                                                                      Page 85
      worksheets
Audit Commands




                                     Output results
                                    Confidence Band




Auditing data on Excel worksheets                     Page 86
Audit Commands
Output results (pasted into Excel work sheet)
Linear regression report:
Equation: y = b + mx
Intercept: -98,566,325.03
Slope:.75
Correlation: 92%
Precision: 0.95
Desc                  X                       Y                     Predicted        Lower Prediction Lower Confidence
                2006            612,431,244           366,090,524        362,095,393      362,075,542     362,081,464
                2006            613,830,062           367,229,455        363,147,564      363,127,884     363,133,880
                2006            612,620,399           365,915,304        362,237,673      362,217,845     362,223,777
                2006            618,495,141           369,547,857        366,656,567      366,637,446     366,643,700
                2006            627,127,285           374,879,234        373,149,538      373,131,398     373,138,180
                2006            633,270,865           378,741,151        377,770,648      377,753,157     377,760,358
                2007            632,794,709           378,369,860        377,412,490      377,394,950     377,402,118
                2007            642,889,555           384,330,410        385,005,684      384,989,116     384,997,055
                2007            644,463,504           385,499,489        386,189,586      386,173,156     386,181,226
                2007            647,205,315           386,752,684        388,251,935      388,235,738     388,244,043
                2007            653,761,539           390,778,601        393,183,429      393,167,743     393,176,647
                2007            652,110,029           390,005,684        391,941,188      391,925,380     391,934,128
                2007            660,198,698           394,903,316        398,025,366      398,010,110     398,019,649
                2007            664,973,395           397,501,158        401,616,822      401,601,837     401,611,873
                2007            668,487,813           399,771,977        404,260,315      404,245,502     404,255,913
                2007            668,513,159           399,672,729        404,279,380      404,264,568     404,274,982
                2007            678,544,943           405,511,744        411,825,140      411,810,679     411,822,128
                2007            681,055,251           407,453,084        413,713,356      413,698,949     413,710,617
                2008            684,321,972           409,175,851        416,170,535      416,156,179     416,168,076
                2008            686,935,005           410,469,415        418,136,020      418,121,687     418,133,702
                2008            693,665,939           414,624,926        423,198,929      423,184,588     423,196,558
                2008            695,128,158           415,499,082        424,298,789      424,284,432     424,296,327
                2008            698,103,060           417,103,640        426,536,466      426,522,064     426,533,753
                2008            704,591,803           421,191,848        431,417,202      431,402,636     431,413,719
                                                   Output results




       Auditing data in Excel
                                                                                           Page 87
       worksheets
Audit Commands



                                          Confidence Band
Output results (chart)
The chart below was specified using a custom color scheme and the title shown. These values are
provided using the “Chart” tab on the processing form.




The chart indicates that there is a good correlation (98.7%) between the claim amount and the ffp
amount. The correlation should be 100%. Further checking is needed at the account level.
                                      Output results - chart




    Auditing data on Excel worksheets                                                Page 88
Audit Commands


    4.3.9 Invoice Near Miss


                                         Invoice “Near Miss”


Invoice Near Miss

Duplicate invoices may arise due to a variety of circumstances, even when system edits are in
place. One example is where two invoices from the same vendor for the same amount are entered,
where one invoice number is a slight variation of the other, e.g. a transposition. In cases like this,
the system may not necessarily recognize that the invoices are duplicates.

The purpose of the near miss procedure is to identify potential duplicate invoices by checking for
any combination of two invoices which meet the following criteria:

same vendor number
difference in invoice amounts is $.02 or less
date difference is less than amount specified
difference in invoice numbers (as measured by Levenshtein distance) is less than the number spe-
cified

An example will illustrate:

First invoice - vendor 123, amount $100.00, date 8/18/2009, invoice number 10023

Second invoice - vendor 123, amount $100.00, date 9/5/2003, invoice number 10032

If the specification for the identification of duplicates were 30 days and a Levenshtein distance of 2,
these two invoices would be flagged as potential duplicates.

For this test, the input data does not need to be sorted. However, the comparison process is com-
putationally intensive, so that invoices from any one vendor are tested in blocks of up to 200 in
count. Generally, the system will identify potentially duplicate invoices based upon the criteria
provided, but it is possible that for vendors with a large number of invoices, two potentially duplicate
invoices could be missed.




      Auditing data in Excel
                                                                                Page 89
      worksheets
Audit Commands




                                         Output results
                                      Invoice “Near Miss”
Output results (pasted into Excel work sheet)
Near Miss Report
Vendno    Amt         Inv Date     Second Date
                                             Invno      Suspect Invno
                                                                   Closeness
V200         103.02    5/31/2007   5/31/2007                2103           4
V200         103.02     6/2/2007   5/31/2007                2103           4
V200         103.02     6/2/2007   5/31/2007                               0
V201         186.01    5/26/2007   5/26/2007       2186     2186           0
V202         647.82    4/29/2007   4/29/2007     20647      2647           1
V202         647.82    4/29/2007   4/29/2007       2467     2647           2
V202         647.82    4/29/2007   4/29/2007       2467    20647           2
V202         647.82    4/29/2007   4/29/2007       2647     2647           0
V202         647.82    4/29/2007   4/29/2007       2647    20647           1
V202         647.82    4/29/2007   4/29/2007       2647     2467           2

    Auditing data on Excel worksheets                                          Page 90
Audit Commands
                          Output results




Auditing data in Excel
                                           Page 91
worksheets
Audit Commands



     4.3.10          Split Invoices

                                               Split invoices

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.
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.
Usage Example 1
A test of invoices is made to determine if any potential “split invoice” payments can be identified. The
names of the column values to be tested are as follows:
                         Column name                         Description
                             Vendor                       Vendor number
                              InvNo                       Invoice Number
                            InvDate                         Invoice Date
                             InvAmt                       Invoice Amount
Tests are to be made for invoices with dates up to 30 days apart.
The values entered into the form are shown below.




     Auditing data on Excel worksheets                                                  Page 92
Audit Commands




                                         Output results
                                         Split invoices
Output results (pasted into Excel work sheet)
Split Invoice Report
Vendno      Inv No    Inv No2   Amount   Amount2 Amount 3 Diff
V201             2186      2186    86.01   186.01     100                   2         30
V201             2186      2186      100   186.01   86.01                   2         30
These results indicate that there was an invoice paid in the amount of $186.01. In addition, two other
invoices to the same vendor, within the specified time period were paid which also totaled to $186.01 =
$100.00 + $86.01.
                                             Output results



      Auditing data in Excel
                                                                                 Page 93
      worksheets
Audit Commands


    4.3.11             Check SSN


                                     Validity of Social Security Numbers

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.


Usage Example 1


A test of validity of social security numbers is to be performed on data where the social security number
column is named “SSN”.
Audit Command values
          Column value – [SSN]
          Text Box – (empty)
          Where – (empty)




Results
          A list of all records where the social security number is invalid.
The input form used to perform the checking is shown below.




    Auditing data on Excel worksheets                                                  Page 94
Audit Commands




                                   Output results


                         Validity of Social Security Numbers




Auditing data in Excel
                                                               Page 95
worksheets
Audit Commands

Output results (pasted into Excel work sheet- not all rows shown – no social security numbers shown are
valid – highlight added for emphasis)
SSN                                     LASTNAME    FIRSTNAME   MIDNAME DOB              ADDRESS CITY
NOT A REAL SOCIAL SECURITY NUMBER       BLACKBURN   BLAKE                    1/15/1930   P O BOX 196
                                                                                                   AGURA HILLS
NOT A REAL SOCIAL SECURITY NUMBER       NYMAN       WOODROW     A            1/24/1930   10013 S RHODES
                                                                                                   MONMOUTH JUNCTION
NOT A REAL SOCIAL SECURITY NUMBER       MCMULLAN    CLAYBORN                 1/29/1930   931 E HOPE ST
                                                                                                   WESTPORT
NOT A REAL SOCIAL SECURITY NUMBER       WEINREB     DEBBIE                   5/12/1930   818 KIRKWOOD ST
                                                                                                   HOLLIS
NOT A REAL SOCIAL SECURITY NUMBER       DIAZ        CHARLENE                 5/18/1930   C/O 3420 NE 168TH ST
                                                                                                   PELHAM
NOT A REAL SOCIAL SECURITY NUMBER       NANCE       YVONNE      A            8/15/1930   10 RAINBOW LANE HILLS
                                                                                                   GRANADA
NOT A REAL SOCIAL SECURITY NUMBER       RUSSELL     MELISSA     JAMES        8/30/1930   237 MASTEN RD
                                                                                                   EGGERTSVILLE
NOT A REAL SOCIAL SECURITY NUMBER       BARBOUR     ANTHONY                 10/22/1930   P O BOX 630, #79729-004
                                                                                                   ROCKVILLE CTR
NOT A REAL SOCIAL SECURITY NUMBER       STONER      JO          MIGUEL       4/17/1931   4595 HYLAND BLVD
                                                                                                   COLEMAN
NOT A REAL SOCIAL SECURITY NUMBER       PEPIN       LINDA       L            6/30/1931   311 BRIDGE ST
                                                                                                   DECATUR
NOT A REAL SOCIAL SECURITY NUMBER       MCNAMARA    TIMOTHY     ALICE       12/30/1931   11120 NW GAINESVILLE ROAD
                                                                                                   LOS ALTOS
NOT A REAL SOCIAL SECURITY NUMBER       CASTRO      LOUIS       L            1/22/1932   300 MAIN STREET
                                                                                                   ROCHESTER
NOT A REAL SOCIAL SECURITY NUMBER       CAPLES      ANGELA                   1/25/1932   P O BOX 8103
                                                                                                   READING
NOT A REAL SOCIAL SECURITY NUMBER       SCHWANDT    LOUIS       L            1/30/1932   3000 MURWORTH DR, APT 511
                                                                                                   SPOKANE
NOT A REAL SOCIAL SECURITY NUMBER       FISHKIN     AVANELL                  4/23/1932   P O BOX 496
                                                                                                   MIAMI
NOT A REAL SOCIAL SECURITY NUMBER       MOORE       LEROY       LANG          7/1/1932   3201 KNIGHT ST, APT 1402
                                                                                                   KENNER
NOT A REAL SOCIAL SECURITY NUMBER       BAJZA       MEGAN       JEAN          7/9/1933   241 FARNOL ST, SW
                                                                                                   PRESCOTT
NOT A REAL SOCIAL SECURITY NUMBER       BROWN       BRIDGETTE                 8/2/1933   P O BOX 1032, #79399-004
                                                                                                   CAMP VERDE
NOT A REAL SOCIAL SECURITY NUMBER       WHITE       MARK        K             9/7/1933   269 EAST S STREET GROVE
                                                                                                   DOWNERS
NOT A REAL SOCIAL SECURITY NUMBER       BUTCHER     HARRIET     S            3/13/1934   5771 DEXTER CIRCLE
                                                                                                   KNOXVILLE
NOT A REAL SOCIAL SECURITY NUMBER       VANGRAEFSCHEPE
                                                    JASON       PARAMA       3/26/1934   501 N 13TH AVENUE
                                                                                                   CHARLESTON


                                             Output results




    Auditing data on Excel worksheets                                               Page 96
Audit Commands


     4.3.12          Check PO Box


                                        Check for Post Office Box

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.


In audits of disbursements made based upon an accounts payable system, one of the audit tests
commonly performed is to test for vendors whose address is a post office box. Generally, vendors
should have a street address where they receive their mail. In certain instances, fraudulent payments
have been made to vendors using a post office box in order to disguise the true nature of the payment,
which may be associated with an employee of the company making the payment.


Although it is possible to visually check for post office boxes in addresses, the process can be tedious
and time consuming, especially if a large number of records are involved. One of the challenges is
simply the ability to recognize many of the variations possible in the designation of a post office box in
an address. For example, the address might be structured in any of the following formats:


         P.O. Box 123
         POB 123
         Post office box 123
         PO 123
         Box 123
         pobox 123
         Etc.


Example 1


Search the column named “Address1” in the vendor master for addresses which might be post office
boxes.


      Auditing data in Excel
                                                                                    Page 97
      worksheets
Audit Commands




                                         Output results


                                    Check for Post Office Box




Auditing data on Excel worksheets                               Page 98
Audit Commands
Output results (pasted into Excel work sheet – not all rows and columns shown, highlighting added for
emphasis)
ADDRESS                        LASTNAME       FIRSTNAME IDNAME DOB
                                                      M                      CITY     STATE
P O BOX 196                    BLACKBURN      BLAKE                1/15/1930 AGURA HILLS
                                                                                      CA
P O BOX 630, #79729-004        BARBOUR        ANTHONY             10/22/1930 ROCKVILLE CTR
                                                                                      NY
P O BOX 8103                   CAPLES         ANGELA               1/25/1932 READING PA
P O BOX 496                    FISHKIN        AVANELL              4/23/1932 MIAMI    FL
P O BOX 1032, #79399-004       BROWN          BRIDGETTE             8/2/1933 CAMP VERDE
                                                                                      AZ
P O BOX 820, HIGHWAY 44        TELFORD        ANGELA               1/14/1934 LITTLE ROCK
                                                                                      AR
P O BOX 41617                  HYATT          BARBARA               8/3/1934 GRAND ISLAND
                                                                                      NY
P O BOX 638                    GURUNIAN       ANTHONY               1/4/1937 MIAMI    FL
P O BOX 8119                   ARTMAN         ANGELA               2/26/1937 MALIBU CA
P O BOX 52362                  HARDING        ARTHUR               9/10/1937 PALM HARBOR
                                                                                      FL
P O BOX 7                      STONE          ANNA                 1/27/1938 WARREN MI
P O BOX 1813                   FAULKNER       BONNIE               9/22/1938 RINGWOODJN
P O BOX 737                    CARR           ANGELIQUE            9/28/1938 MASSAPEQUA PARK
                                                                                      NY
POST OFFICE BOX 3007           ANDERSON       AMANDA              12/29/1938 FORT VALLEY
                                                                                      GA
P O BOX 6001, UNIT D FCI       MILLS          ARMANDO               6/3/1939 CHICAGO IL
P O BOX 2796                   ROUTON         BETH                  9/9/1939 SAN JOSE CA
P O BOX 2002                   LINCK          BILL                  1/3/1940 SANTA MONICA
                                                                                      CA
P O BOX 641                    BUANNO         ANSA                 3/31/1940 DAVIDSONVILLE
                                                                                      MD
P O BOX 312                    SCANDY         BERNADETTE          10/10/1940 PORT WASHINGTON
                                                                                      NY
P O BOX 832                    JONES          ANGELA                4/9/1941 MASPETH NY
P O BOX 60189                  BARTLETT       ARLENE               9/19/1941 MADISON WI
                                            Output results




      Auditing data in Excel
                                                                                Page 99
      worksheets
Audit Commands




    4.3.13          Calculated Values


                                         Calculated Values



In many instances the auditor wishes to add a column of data, e.g. a calculated amount, based
upon values contained in other columns. Calculated values

A common procedure used during the analysis of data in Excel is to insert one or more columns and
calculate their value using formula which based on values contained in other columns. Although
this procedure is effective, it has the drawback that column letters must be used instead of column
names which makes interpreting and verifying the formulae used more difficult.

The purpose of the calculated values procedure is to add one or more columns to a work sheet us-
ing formula with column names. Often the formula will consist of mathematical operations, but any
SQL function may be used (see list of functions in description of where clause values).

The syntax for the calculated values is "expression1 as name1, expression2 as name2" etc. where
"expression" is a calculated value. The word "as" must be used without change, and "name" must
be a description beginning with a letter and consisting of only letters, numbers and the special char-
acters "$", "_". If the name contains any embedded spaces, then the entire name must be enclosed
in brackets, e.g. "[cost amount]".

Examples -

Add a column called net book value computed as cost less accumulated depreciation

Other info - [cost] - [accumulated depreciation] as [net book value]

(Note the use of brackets due to embedded spaces in the names)




    Auditing data on Excel worksheets                                              Page 100
Audit Commands




                          Output results


                         Calculated Values




Auditing data in Excel
                                             Page 101
worksheets
Audit Commands

Output results (pasted into Excel work sheet – first column highlighted for emphasis)

property tax TagNo    Cost      AD       Replace Bookval   Salvage     Depr       Life        Location   AcqDate
 72.49729037     3504      2438 988.0542       731 1449.95       488    197.6108          6   ABC            4/6/2005
  97.1394758     4148      3244 1301.21        973 1942.79       649    260.2421          5   ABC            2/3/2006
 274.2308104     3302      9163 3678.384      2749 5484.62      1833    735.6768          8   ABC          10/15/2004
 146.6431954     3816      4937 2004.136      1481 2932.86       987    400.8272          4   ABC            7/8/2005
 240.3376714     3411      8118 3311.247      2435 4806.75      1624    662.2493          5   ABC            2/9/2007
 245.5702876     2547      8258 3346.594      2477 4911.41      1652    669.3188          9   ABC           5/26/2007
 94.12422075     1701      3143 1260.516       943 1882.48       629    252.1031         11   ABC           9/30/2005
 265.6780722     3960      8955 3641.439      2686 5313.56      1791    728.2877          3   ABC           12/8/2005
 85.70210075     5056      2885 1170.958       866 1714.04       577    234.1916          5   ABC           3/24/2005
 47.82652079     2996      1596 639.4696       479  956.53       319    127.8939          3   ABC           10/7/2005
 93.07851995     1299      3115 1253.43        934 1861.57       623    250.6859         12   ABC            3/4/2006
 66.92986036     2881      2244 905.4028       673  1338.6       449    181.0806          8   ABC            3/6/2006
          30.4   2791      3039     2431       912    608        608        761.4        12   ABC           3/17/2007
 155.8641946     1443      5240 2122.716      1572 3117.28      1048    424.5432         12   ABC          11/17/2004
 42.23143191     1202      1416 571.3714       425  844.63       283    114.2743          6   ABC            6/5/2007
 172.5694554     3567      5776 2324.611      1733 3451.39      1155    464.9222         11   ABC           12/5/2004
  79.1798243     5010      2645 1061.404       794  1583.6       529    212.2807         10   ABC           9/28/2006
  91.2098218     4163      3048 1223.804       914  1824.2       610    244.7607          4   ABC          12/19/2005
 271.3595988     1306      9177 3749.808      2753 5427.19      1835    749.9616          7   ABC           9/17/2006
        11.65    5205      1165      932       350    233        233    95.43749          8   ABC            4/8/2006
  73.8564635     4219      2500 1022.871       750 1477.13       500    204.5741          3   ABC           7/10/2006
 17.93122414     1384       603 244.3755       181  358.62       121     48.8751         12   ABC           1/25/2006
 284.3327576     3914      9578 3891.345      2873 5686.66      1916     778.269          4   ABC           8/19/2005
 44.18759538     4323      1482 598.2481       445  883.75       296    119.6496          7   ABC           3/16/2007
 143.4290984     4758      4829 1960.418      1449 2868.58       966    392.0836          9   ABC            2/3/2006
 79.19611735     3213      2669 1085.078       801 1583.92       534    217.0155         11   ABC           5/21/2006
                                              Output results




    Auditing data on Excel worksheets                                                          Page 102
Audit Commands



    4.3.14           Fuzzy Match (LD)


                                Fuzzy Match (Levenshtein distance)


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".
Usage Example 1


Fuzzy Match Levenshtein distance

The difference between any two character strings may be measured using the "Levenshtein dis-
tance". This concept was developed by the Russian physicist Vladimir Levenshtein and defines the
distance as the minimum number of character additions, deletions and changes necessary to trans-
form one character string into another.

For auditors, the concept is applicable to searches for character strings which represent only very
minor differences between two character strings. For example, the name "McMillan" is similar, but
not identical to "McMillun". In this case the distance would be one, because only a single change
from the letter "a" to the letter "u" is necessary for them to be identical. As another example, trans-
positions will represent a Levenshtein distance of 2, as both an insertion and a deletion are required
in order for the two strings to be identical.

Common uses for the algorithm can be found in searches where an exact match is not found, but
two or more instances may be identified which are "close". Such searches might be needed in
looking at vendor master files, checking for potentially duplicate invoice numbers or any other situ-
ation where two or more instances might be found which are close, but not identical.

The test can be performed on either a single column by specifying the column name, or else on all
columns (by omitting the column name). If the test is to be done ignoring case, then the command
"UCASE" should be specified for the column name, e.g. Ucase(lastname). If leading and trailing
spaces are to be ignored the "TRIM" command should be specified, e.g. Trim(address).

The search specification is made by providing the text to search against, as well as the maximum
distance to be considered. The following are examples of usage:


      Auditing data in Excel
                                                                                Page 103
      worksheets
Audit Commands

Check for a last name within a distance of 2 from McMillan.

column name - lastname
other info - McMillan, 2

Same check, but ignore case

column name - Ucase(lastname)
other info - MCMILLAN, 2

Check for address like 108 Fallsworth, trim any spaces on left and right

column name - trim(address)
other info - 108 Fallsworth

Same check, but ignore case

column name - ucase( trim(address))
other info - 108 FALLSWORTH




                                              Output results


                               Fuzzy Match (Levenshtein distance)
Output results (pasted into Excel work sheet – not all columns shown, highlighting added for
emphasis)
LASTNAME                                FIRSTNAME     MIDNAME      DOB       ADDRESS       CITY   STATE
MCMULLAN                                CLAYBORN                   1/29/1930 931 E HOPE ST WESTPORT T
                                                                                                  C

This schedule is the results of a search for a record with a last name of ‘MCMILLAN’ with a Levenshtein
distance of 2. In this example, a single character ‘U’ could be replaced with an ‘I’ to obtain the match
desired. This was the only instance identified in the search that was within a Levenshtein distance of 2.
                                             Output results


    Auditing data on Excel worksheets                                                   Page 104
Audit Commands


    4.3.15            Fuzzy Match (Regular Expression)


                                   Fuzzy Match (regular expression)

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
Usage Example 1
A search is to be made of employee last names where the first letter is “H” and the second letter is
any of the characters “E” through “I”. The last name to be matched can contain two or more letters
in total. The search specification is shown in the form below.




       Auditing data in Excel
                                                                                   Page 105
       worksheets
Audit Commands




                                       Output results


                              Fuzzy Match (regular expression)




Auditing data on Excel worksheets                                Page 106
Audit Commands
Output results (pasted into Excel work sheet – not all rows and columns are shown)
LASTNAME                            FIRSTNAME    MIDNAME     DOB                ADDRESS        CITY
HENRY                               DARRIN                          1/13/1930   844 JEFFERSON ST
                                                                                               CLEARWATER
HENTHORN                            PAMELA       H                  3/25/1936   2070 HIGHWAY NEW GLOUCESTER
                                                                                               30 W
HICKS                               SHIRLEY      C                  6/20/1936   13317 S W 64 LANE
                                                                                               S PADRE ISLAND
HILPERT                             VANESSA      A                 11/25/1936   1072 FORDHAMSANTA ANA
                                                                                                LANE
HERNANDEZ                           BILLIE                           2/7/1947   P O BOX 2000, #57621-004
                                                                                               MIAMI
HENNEKES                            DAVID                           4/22/1948   830 N FOOTE, APT B CITY
                                                                                               YUBA
HELMS                               JOEL         MELVIN              7/1/1948   444 W DUARTE SEATTLE
                                                                                               RD, #C3
HEADRICK                            AIDA                            3/13/1949   ROUTE 7, BOX 7338
                                                                                               CHICAGO
HEGARTY                             CARLOS                          8/30/1950   MORGAN HILL FARM, BOX 62
                                                                                               RUDYARD
HENDERSON                           LINDA        L                 10/10/1950   315 S 3RD STREET
                                                                                               OSHKOSH
HENLEY                              DAVID                            3/4/1951   8303 LENNON ROAD
                                                                                               WOODLAND HILLS
HENRY                               TOBI         ALAN               7/10/1951   111 STERLING DRIVE
                                                                                               REDDING
HERNANDEZ                           CHRISTOPH                       7/30/1952   95 PALISADE AVENEWINGTON
HERING                              ARTHUR                          10/8/1954   P O BOX 589 ALBUQUERQUE
HERZOG                              LUIS         L                   8/4/1955   3 MAULDIN AVEBARNESBORO
HESSER                              BRENDA                          8/11/1955   P O BOX 1439 JUNCOS
HENRY                               MARK         K                  10/5/1955   269 HANOVER AVE, #202
                                                                                               CULPEPER
HINTON                              RICKY        E                   5/2/1957   1710 WEINSTOCK ST
                                                                                               LAKELAND
HENDERSON                           JOHN         MARIE              2/19/1958   4233 SUNLAND WARREN E
                                                                                               COURT, S
HEATH                               TERRI        ANN                6/17/1958   11614 EAST 18TH STREET
                                                                                               CEDAR CREEK
                                        Output results




     Auditing data in Excel
                                                                           Page 107
     worksheets
Audit Commands




    4.3.16           Sequential Invoices


                                           Sequential invoices


Sequential Invoices

Generally vendors do not issue sequentially numbered invoices to the same customer, except in un-
usual situations or in cases where they have only a single customer. Sequential invoice checking is
a test to determine which vendors of your organization may have only one customer - your organiz-
ation.

Note that the input data does not need to be sorted.

The system does the checking by first sorting the invoice data by vendor and invoice number and
then checking if any two invoices represent sequential numbers, i.e. they have a numeric difference
of one. For any such instance identified, all the detail information for both invoices is listed in a re-
pot for review.

To perform the test, only the name of the vendor number column and the name of the column con-
taining the invoice number need to be provided.

As a simple example, suppose that vendor invoice data is to be tested for sequential invoices and
that the name of the column identifying the vendor is called "Vend_No" and the name of the column
containing the invoice number is "Invoice_No". The command to perform the check would then be
"Vend_No, Invoice_No" (without the quotes).

Note that any non-numeric values are removed from the invoice number before a comparison is
performed. Thus an invoice number "C102345B" would be transformed to "102345" for purposes of
the test.




Example 1
Vendor invoice data is to be tested to determine if any vendor has issued sequential invoices. The input
data is not sorted. The test to be selected is “Sequential invoices” as selected from the drop down list of
commands. The name of the column for the vendor number is named “Vendor”. The test is not limited
to any records, so the “where” information is left blank. The “other information” is the name of the


    Auditing data on Excel worksheets                                                   Page 108
Audit Commands
vendor column and the name of the column containing the invoice numbers, separated by a comma.
Results




                                         Output results
                                       Sequential invoices
Output results (pasted into Excel work sheet)
Count of sequentially numbered items
V201 : 1
The results indicate that only one vendor (“V201”) had issued a sequential invoice and that vendor
(“V201”) issued just one sequential invoice.
                                               Output results




      Auditing data in Excel
                                                                                Page 109
      worksheets
Audit Commands




         4.4 Patterns


4.4.1 Round Numbers

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
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.
Usage Example 1


In an audit of accounts payable, a comparative analysis is to be made of purchase orders by
buyer to determine which buyers purchase orders are the most different from all others as
measured by the type and quantity of round numbers.


Approach – using the “patternrn” command, check the purchase orders.
Audit Command values
        Column value – [purchase order amount]
        Text Box – [buyer number], [purchase order amount]
        Where – (empty)

Auditing data on Excel worksheets                                                      Page 110
Audit Commands
Results
          A list of the results of pattern matching for all buyers. The list is in descending order, first
showing the buyer whose pattern is the most different.



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


Usage Example 2


A test is to be performed for usage of round numbers in general journal entries by the person
preparing the journal entry. The column name for the journal entry preparer is “preparer”.


Approach – using the “patternrn” command, check the journal entries.
Audit Command values
          Column value – [journal amount]
          Text Box – [preparer], [journal amount]
          Where – (empty)
Results
          A list of the results of pattern matching for all preparers. The list is in descending order,
first showing the preparer whose pattern is the most different.


Usage Example 3


A test is to be performed for usage of round numbers in fixed asset costs by location.


                              Pattern analysis using round numbers




 Auditing data in Excel
                                                                                   Page 111
 worksheets
Audit Commands




                                       Output results
                           Pattern analysis using round numbers




Auditing data on Excel worksheets                                 Page 112
Audit Commands
Output results (pasted into Excel work sheet)
Key         d-stat    Chi Square
XSF          2.07E-02    6.085982622
AB           2.26E-02    4.260527481
GHF          1.39E-02    1.830195487
FGT          9.12E-03    1.659130377
JHT          9.19E-03    0.747565059
PA           6.26E-02    0.534411792
ABC          2.04E-03    0.500401568
PE           6.26E-02    0.400815832
EFR          1.91E-02    0.392424534
NC           6.26E-02    0.267215216
DSR          1.83E-03    0.162121923
MI           6.26E-02      0.13360994
CF           6.26E-02      0.13360994
This report indicates that the location coded “XSF” is the most different from all other locations as
measured by the usage of round numbers.
                                              Output results




      Auditing data in Excel
                                                                                    Page 113
      worksheets
Audit Commands



     4.4.2 Data Stratification



                                  Pattern analysis using data stratification

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”.
Usage Example 1


In an audit of inventory, the inventory values are known to be clustered in a certain pattern.
Approximately 20% of all inventory items have a value under $100. Then 50% have a value under $200
and 80% have a value under $500. The stratification ranges used to obtain these results were the bin
values of 0, 100, 200, 500
A test is to be made to identify the warehouse location which has inventory value which are the most
different from this pattern as measured using data stratification and the bin values above,


Approach – using the “Pattern - stratification” command, analyze the inventory values. .
Audit Command values
          Column value – [unit cost]
          Text Box – [location],[unit cost], 0, 100, 200, 500
          Where – (empty)
Results
          A list, by location, of the measures of the difference between the values at that location and

     Auditing data on Excel worksheets                                                    Page 114
Audit Commands
those of the entire population, as measured using Chi Square. The list is in descending order.




                                            Output results


                               Pattern analysis using data stratification




      Auditing data in Excel
                                                                                Page 115
      worksheets
Audit Commands

Output results (pasted into Excel work sheet)
Key         d-stat      Chi Square
ABC          1.26E-03    79.32112
DSR          4.17E-02    58.98408
GHF          2.17E-02    58.02021
JHT          0.079345    57.38157
NC           0.216289     56.3838
AB           2.65E-02    55.07401
FGT          2.73E-02    52.50759
PA           0.230438     51.2955
EFR          6.31E-02    51.25032
PE           0.216289    48.51521
XSF          4.50E-02    47.23957
CF            0.35716    46.83188
MI           0.429626    46.68186
This report indicates that, based upon data stratification, location ‘ABC’ has the largest variance
between the results of the data stratification at that location and that of all locations combined.
                                               Output results




     Auditing data on Excel worksheets                                                    Page 116
Audit Commands



     4.4.3 Day of Week


                                    Pattern analysis using day of week

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.


Usage Example 1
In an audit of revenue in a retail environment, determine which store’s revenue was the most different,
based upon analysis by day of week.
Approach – using the “patternwd” command, analyze such transactions.
Audit Command values
          Column value – [trans date]
          Text Box – [store number],[transdate]
          Where – (empty)
Results
          A listing of summary results, by store location, in descending order
Usage Example 2


In an audit of journal entries, determine which account’s postings were the most different, based upon
the day of the week they were posted.
Approach – using the “patternwd” command, analyze such transactions.
Audit Command values
          Column value – [ posting date]
          Text Box – [account number], [posting date]
          Where – (empty)
Results
      Auditing data in Excel
                                                                                     Page 117
      worksheets
Audit Commands

       A listing of summary results, by account number, in descending order


In the example below, a test was performed on asset acquisitions, by day of week.




                                           Output results


                                 Pattern analysis using day of week




    Auditing data on Excel worksheets                                               Page 118
Audit Commands
Output results (pasted into Excel work sheet)
Key        d-stat      Chi Square
ABC         1.26E-03    79.32112
DSR         4.17E-02    58.98408
GHF         2.17E-02    58.02021
JHT         0.079345    57.38157
NC          0.216289     56.3838
AB          2.65E-02    55.07401
FGT         2.73E-02    52.50759
PA          0.230438     51.2955
EFR         6.31E-02    51.25032
PE          0.216289    48.51521
XSF         4.50E-02    47.23957
CF           0.35716    46.83188
MI          0.429626    46.68186
                                         Output results




      Auditing data in Excel
                                                          Page 119
      worksheets
Audit Commands



     4.4.4 Holidays


                                        Pattern analysis using holidays

An example will best illustrate the concept of pattern testing by holiday. Consider a case for the retail
environment. In some cases, sales tend to be concentrated on certain 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.


Usage Example 1
In an audit of revenue in a retail environment, determine which store’s revenue was the most different,
based upon analysis by sales on holidays.
Approach – using the “patternhol” command, analyze such transactions.
Audit Command values
          Column value – [trans date]
          Text Box – [store number],[transdate]
          Where – (empty)
Results
          A listing of summary results, by store location, in descending order
Usage Example 2


In an audit of journal entries, determine which account’s postings were the most different, based
postings made on holidays.
Approach – using the “patternhol” command, analyze such transactions.
Audit Command values
          Column value – [ posting date]
          Text Box – [account number], [posting date]
          Where – (empty)
Results
          A listing of summary results, by account number, in descending order


     Auditing data on Excel worksheets                                                   Page 120
Audit Commands
In the example below, a test was performed on asset acquisitions made on a holiday.




                                           Output results


                                  Pattern analysis using holidays




     Auditing data in Excel
                                                                               Page 121
     worksheets
Audit Commands

Output results (pasted into Excel work sheet)
Key       d-stat      Chi Square
DSR        1.29E-02    10.68799
EFR        2.30E-02    9.871974
GHF        2.07E-02    6.070443
AB         7.69E-03    4.901453
FGT        9.57E-03    3.471517
JHT        2.50E-02    1.765012
ABC        2.82E-03    1.366258
XSF        2.50E-02    1.330289
PA         2.50E-02     0.10236
PE         2.50E-02    7.68E-02
NC         2.50E-02    5.12E-02
MI         2.50E-02    2.56E-02
CF         2.50E-02    2.56E-02
                                         Output results




    Auditing data on Excel worksheets                     Page 122
Audit Commands


     4.4.5 Benford’s Law


                                  Pattern analysis using Benford’s Law

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.
Usage Example 1


In an audit of expense reports, a test is to be made to determine which employee’s expense reports
were the most different from all other expense reports, based upon Benford’s Law.
Approach – using the “patternben” command,analyze expense report transactions.
Audit Command values
          Column value – [expense amount]
          Text Box – [employee number], [expense amount], F1
          Where – (empty)
Results
          A listing of summary results, by employee number, in descending order


Usage Example 2


In an audit of inventory counts, a test is to be made to determine which inventory counts were the most
different from all other warehouse locations , based upon Benford’s Law.
Approach – using the “patternben” command, analyze inventory count transactions.
Audit Command values
          Column value – [inventory count]
          Text Box – [warehouse], [inventory count], F1
          Where – (empty)
         Auditing data in Excel
                                                                                  Page 123
         worksheets
Audit Commands

Results
          A listing of summary results, by warehouse, in descending order
In the example below, the test was performed using cost amounts at various locations. The Benford’s
Law test was for first digit, F1.




                                              Output results


                                     Stop and Go Attribute sampling




     Auditing data on Excel worksheets                                             Page 124
Audit Commands
Output results (pasted into Excel work sheet)
Key        d-stat     Chi Square
ABC         0.257636       520.197645
DSR         0.309237     62.94220806
GHF          0.28177     45.65568845
AB           0.23824     41.67393551
FGT         0.346857     36.99397174
JHT         0.317603     16.02484576
XSF               0.3    12.12429792
EFR         0.275362     5.825805153
PE                  0               0
PA                  0               0
NC                  0               0
MI                  0               0
CF                  0               0
The report indicates that, as measured using Benford’s Law, location ‘ABC’ is the most different from the
population as a whole.
                                            Output results




      Auditing data in Excel
                                                                                 Page 125
      worksheets
Audit Commands




         4.5 Sampling


4.5.1 Attributes – Unrestricted: Stop and Go

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
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)




Auditing data on Excel worksheets                                                 Page 126
Audit Commands
            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.



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.
An example of the chart output is shown below (attribute test for signature on
documents as tested in 25 samples):




 Auditing data in Excel
                                                                        Page 127
 worksheets
Audit Commands




                                     Figure 14 – Attribute sampling




The chart above presents the results of the attribute sample test visually for four confidence
levels as follows:
    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.



                               Stop and Go Attribute sampling




Auditing data on Excel worksheets                                                 Page 128
Audit Commands

How the results are calculated:
The upper limit is computed using the following formula (assumes a confidence level of 90%):




The lower limit is computed using a similar formula:




These formula are based upon the article in The American Statistician:




      Auditing data in Excel
                                                                               Page 129
      worksheets
Audit Commands




                                       Output results


                               Stop and Go Attribute sampling




Auditing data on Excel worksheets                               Page 130
Audit Commands
Output results (pasted into Excel work sheet)
Sampling results:
Sample size                          82
Errors                                5
Error rate                       6.10%
Population size                   5713
Confidence used                95.00%
Z-score                        1.95996
Point estimate:                     348
Lower limit                         116
Upper Limit                         777
Confidence used                98.00%
Lower limit                          93
Upper Limit                         865
Confidence used                90.00%
Lower limit                         141
Upper Limit                         705
Confidence used                80.00%
Lower limit                         172
Upper Limit                         627


                                             Output results
                                          Stop and Go Attribute
Output results (chart)
The chart below was specified using a custom color scheme and the title shown. These values are
provided using the “Chart” tab on the processing form.




      Auditing data in Excel
                                                                             Page 131
      worksheets
Audit Commands




                                    Output results - chart




Auditing data on Excel worksheets                            Page 132
Audit Commands
4.5.2 Variable Sampling – Unrestricted Stop and Go

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
    3. 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.

 Auditing data in Excel
                                                                               Page 133
 worksheets
Audit Commands

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




                                      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
Usage Example 1


                               Stop and Go Variable sampling

Auditing data on Excel worksheets                                                 Page 134
Audit Commands

The formula used for variable sampling is as follows:
The standard deviation is computed using the following formula:




The standard error of the mean is




The total standard error is




The confidence interval is computed using the Student’s T-value as computed using the “Cephes”
software (U.S. Department of Energy).




      Auditing data in Excel
                                                                             Page 135
      worksheets
Audit Commands




                                      Output results


                               Stop and Go Variable sampling




Auditing data on Excel worksheets                              Page 136
Audit Commands
Output results (pasted into Excel work sheet)
Sampling results:
Sample size                                        71
Sample mean                                    563.29
Sample Std Dev                                 224.98
Population size                                 5713
Point estimate:                          3,218,048.41

Values at 95% confidence                        5713
t-value used                                 1.99444
Lower limit                              2,915,688.41
Upper Limit                              3,520,408.42
t-value                                      1.99444

Values at 98% confidence                        5713
Lower limit                              2,857,114.01
Upper Limit                              3,578,982.81
t-value                                      2.38081

Values at 90% confidence                        5713
Lower limit                              2,965,341.39
Upper Limit                              3,470,755.44
t-value                                      1.66691

Values at 80% confidence                        5713
Lower limit                              3,021,911.79
Upper Limit                              3,414,185.03
t-value                                      1.29376
                                              Output results
                               Variable Sampling – Unrestricted Stop and Go
Output results (chart)
The chart below was specified using a custom color scheme and the title shown. These values are
provided using the “Chart” tab on the processing form.




      Auditing data in Excel
                                                                              Page 137
      worksheets
Audit Commands




                                    Output results - chart




Auditing data on Excel worksheets                            Page 138
Audit Commands
     4.5.3 Stratified Variable Sampling – Population


                                        Stratified Variable Sampling

One of the first steps in performing a stratified variable sample is a determination of the composition of
each strata, including its variability, etc. With this information it is then possible to perform either a 1)
proportional sample or 2) a disproportionate sample. Generally, auditors will select a disproportionate
sample, as typically the population will not be consistent, and thus the sampling should be concentrated
in those strata which have the most variability.
There is a formula which can be used to determine the optimal counts for sampling, which is referred to
as “Neyman’s allocation”.
The purpose of the stratified variable population command is to assess the population values by strata
and suggest a sample plan based upon Neyman’s allocation, i.e. a disproportionate stratified sample.


The formula used are as follows:
The estimate of the universe mean:




Estimate of universe total:




Estimate of the variance of each strata




Variance of the entire population:




      Auditing data in Excel
                                                                                       Page 139
      worksheets
Audit Commands

A 95% confidence interval for the entire population is




The “z-score” is computed using the inverse normal function of the Cephes software (US DOE).
Neyman’s allocation is calculated using the following formula:




For purposes of the calculation, the costs of sampling ( c sub I and c sub h) are assumed to be uniform.




                                                Output results
                                        Stratified Variable Sampling




    Auditing data on Excel worksheets                                                Page 140
Audit Commands
Output results (pasted into Excel work sheet)
Strata        Count      Mean      Standard Deviation
                                                    Total Amount
          1        345       47.77            28.3            16,481.44
          2        337     140.64            35.34            47,394.01
          3        696       281.6           72.74           195,996.05
          4       1431       480.8           79.45           688,031.46
          5       2213     580.69           111.68         1,285,068.46
          6        691     841.77           149.38           581,664.24
All               5713     492.67 N/A                      2,814,635.66

Neyman Allocation report
Strata    N          Std        Amt            Pct                          Samp Size Next
       1         345       28.3       9,763.58                      1.82%           1      -344
       2         337      35.34      11,908.41                      2.22%           1      -336
       3         696      72.74      50,630.47                      9.44%           3      -693
       4        1431      79.45     113,690.49                     21.20%           6    -1,425
       5        2213     111.68     247,139.50                     46.08%         14     -2,199
       6         691     149.38     103,222.96                     19.25%           6      -685
The first part of the report simply lists the basic statistics for each strata, as exist in the data being
analyzed. The second report is the suggested sampling counts using the Neyman allocation and the
total number of items to be sampled (in this example 30).
                                              Output results




      Auditing data in Excel
                                                                                       Page 141
      worksheets
Audit Commands



     4.5.4 Stratified Variable Sampling – Assessment



                                        Stratified Variable Sampling
Assessing the results of stratified variable sampling.
The stratified variable assessment command extrapolates the results of the sample to the entire
population. For each strata, the basic statistics of the strata are shown, along with the point estimate,
and upper and lower confidence limit using the precision specified.
An example of the command is shown below, where:
Stratum is the name of the column containing the stratum identifier
Audited is the name of the column containing the audited value
Selected is the name of the column containing the indicator as to whether the particular row was
sampled. This will contain an “X” is the row was selected for sampling.
The command in the text box is as follows:
Audited, stratum, selected, 30, .95
The “30” value used in the command is used to request Neyman’s allocation values for a total sample
size of 30. This value does not affect any of the computations, only provide information to be used in the
selection of the next sample.
The “.95” is the precision to be used in determining the confidence levels.




                                              Output results



     Auditing data on Excel worksheets                                                  Page 142
Audit Commands
                                   Stratified Variable Sampling
Output results (pasted into Excel work sheet)
  Strata        N              n        Mean Standard Deviation Estimate Lower Limit Upper Limit
                                                           Point
           1      345               2       59.49        0       20,524.05    20,524.05    20,524.05
           2      337               2       113.4        0       38,214.12    38,214.12    38,214.12
           3      696               7      275.13    67.54      191,488.49    99,353.24   283,623.74
           4     1431              15      499.98    42.45      715,477.10   596,425.31   834,528.90
           5     2213              32      584.25   117.82    1,292,936.26   781,887.74 1,803,984.78
           6      691              13      886.61    65.83      612,649.10   701,798.37   523,499.84
All              5713              71      563.29    80.78    3,218,048.41 2,313,501.12 4,122,595.70

Neyman Allocation report
  Strata       N         Std             Amt          Pct      Samp Size      Next
         1       345       28.3           9,763.58    1.82%              1        -344
         2       337      35.34          11,908.41    2.22%              1        -336
         3       696      72.74          50,630.47    9.44%              3        -693
         4      1431      79.45         113,690.49   21.20%              6      -1,425
         5      2213     111.68         247,139.50   46.08%             14      -2,199
         6       691     149.38         103,222.96   19.25%              6        -685
                                              Output results




      Auditing data in Excel
                                                                              Page 143
      worksheets
Audit Commands



     4.5.5 Stratified Attribute Sampling – Population


                                         Stratified Attribute Sampling

The stratified attribute population command simply prepares a schedule showing the number of items to
be tested within each stratum. Such information provides the auditor a basis for making further decisions
as to the composition of the samples to be tested.
The data values do not have be sorted by strata. Also, although the strata identifiers shown here are
numeric, the strata identifiers may have any value. Each unique value will result in a separate strata for
sample testing.


Usage Example 1
In the example below, the attribute to be tested is identified as “audited”. The name of the column
containing the strata identifier is “stratum” and the name of the column indicating whether the value in
the row is to be sampled and tested is named “Selected”.
Each value selected for sampling is indicated by placing an “X” in the column labeled “selected” (or other
name chosen). For attribute sampling, the audited value will be non-blank if the attribute being tested is
found to exist. All this is illustrated in a very simple example below:
   Row      Signature Selected   Strata
          1                    A
          2           X        B
          3X          X        C
          4                    A
          5                    B
The data being tested consists of five rows, separated into three strata “A”, “B” and “C”. Only rows 2
and 3 have been selected for sampling. The attribute being tested is a signature on a document. The
record for row 2 has a signature, the record for row 3 does not.




     Auditing data on Excel worksheets                                                 Page 144
Audit Commands




                                          Output results


                                   Stratified Attribute Sampling
Output results (pasted into Excel work sheet)
  Strata       Count
           1      594
           2      583
           3     1132
           4      863
           5     1399
           6     1142
All              5713
                                          Output results


      Auditing data in Excel
                                                                   Page 145
      worksheets
Audit Commands




Auditing data on Excel worksheets                    Page 146
Audit Commands


     4.5.6 Stratified Attribute Sampling – Assessment


                                      Stratified Attribute Sampling

The stratified attribute assessment command uses the sample results to extrapolate the results to each
strata and in total. For each stratum, the point estimate, as well as upper and lower limits are listed.
The data values do not have be sorted by strata. Also, although the strata identifiers shown here are
numeric, the strata identifiers may have any value. Each unique value will result in a separate strata for
sample testing.


The command below prepares an extrapolation based upon attribute sampling. The name of the column
containing the stratum identifier is “stratum”, the name of the column containing the results of the test of
the attribute is called “audited”, and the name of the column indicating if the row was selected for
sampling is called “selected”. The confidence level desired for the results is 97%. This the command in
the text box is:


Stratum, audited, selected, .97

Note: By default, results at the three confidence levels – 80%, 90% and 95% are produced. An
   additional confidence level may be specified.




                                              Output results


      Auditing data in Excel
                                                                                    Page 147
      worksheets
Audit Commands

                                   Stratified Attribute Sampling
Output results (pasted into Excel work sheet)
Stratified Attribute Report
Prepared: 11-12-09 10:45:59
Stratum                Sample     Items      Ratio      Universe Projected
                     1         17          3   17.65%          594      105
                     2         17          1     5.88%         583       34
                     3         12          1     8.33%       1132        94
                     4         12          0     0.00%         863        0
                     5         12          0     0.00%       1399         0
                     6         12          0     0.00%       1142         0
Combined                       82          5     4.09%       5713       233
Strata                 Prec 80% Prec 90% Prec 95% Prec 97.3%
                     1    12.04%     15.45%    18.41%     20.77%
                     2     7.43%      9.53%    11.36%     12.82%
                     3    10.62%     13.63%    16.25%     18.33%
                     4     0.00%      0.00%      0.00%      0.00%
                     5     0.00%      0.00%      0.00%      0.00%
                     6     0.00%      0.00%      0.00%      0.00%
Lower limit quantity           87         45          9          5
Lower limit percent        1.52%      0.80%      0.17%      0.09%
Upper limit quantity          380        421        457        486
Upper limit percent        6.65%      7.38%      8.01%      8.51%


                                           Output results




    Auditing data on Excel worksheets                                         Page 148
Access Databases and Excel Workbooks


5 Access Databases and Excel Workbooks



         5.1 Overview
The procedure for working with data contained in Access databases and Excel workbooks is
almost identical to that for working with data which has been “pasted” from the Clipboard, with
two exceptions:
    •   The name of the Access database or Excel workbook must be provided
    •   In the case of Excel, the name of the worksheet must be provided, or
    •   In the case of Access, the name of the table or query must be provided.


All this information is provided using a form and drop down lists.


The rest of the information (e.g. column names, textbox information and “where” information is
identical.




Auditing data on Excel worksheets                                                 Page 149
Access Databases and Excel Workbooks Audit Commands


         5.2 The “Excel/Access” menu item

The input form is contained under the “MS” tab shown below.




The processing consists of the following seven steps:
    1. Select the file name by clicking on the “File” button
    2. Select the Sheet name by clicking on the item in the drop down list. In the case of Excel
        this will be the sheet names contained in the workbook. In the case of Access it will be
        the tables and queries contained within the Access database
    3. Once the sheet name has been selected, click on the column name to select the
        information to be processed
    4. Select the command to be processed from the menu
    5. If applicable, enter any criteria to be used in narrowing the processing “Where” (Note: to
        obtain help, click the label “Where?” to bring up a help form)
    6. If required, enter any information in “Info” box. Note that a help description is displayed
        on the status bar to assist.
    7. Click the “Run” button




Auditing data on Excel worksheets                                                  Page 150
Access Databases and Excel Workbooks Audit Commands

        5.3 An example
To illustrate the process, the auditor wishes to extract information from a worksheet named “FA”
in a workbook named EWP.xls to identify fixed asset records where the fixed asset may have
been over depreciated. Below is the process, step by step.


Step 1 – select the file




The last used directory is shown and the Excel work book named fa.xls is selected.


Step 2 – select the work sheet




 Auditing data in Excel
                                                                            Page 151
 worksheets
Access Databases and Excel Workbooks Audit Commands




Step 3 – select the column name of interest




Step 4 – select the command name to be processed



Auditing data on Excel worksheets                           Page 152
Access Databases and Excel Workbooks Audit Commands




Step 5 – specify selection criteria (if any)
In this example, only the information for the location ‘ABC’ is needed.




Step 6 – provide any additional information required for command processing

 Auditing data in Excel
                                                                    Page 153
 worksheets
Access Databases and Excel Workbooks Audit Commands

In this example, no additional information is required.


Step 7 – click “Run”
When the button labeled “Run” is clicked, the results are written out as a text file
report and as a chart to the directory specified under the “Audit” tab.




Auditing data on Excel worksheets                                         Page 154
Access Databases and Excel Workbooks Audit Commands

         5.4 Working with text files
The procedure for working with text files is almost identical to that for working with data which
has been “pasted” from the Clipboard, with two exceptions:
    •   The name of the directory containing the text file must be provided
    •   The name of the text file included within the directory must be specified


All this information is provided using a form and drop down lists.


The rest of the information (e.g. column names, textbox information and “where” information is
identical.




         5.5 The “File” tab




The input form is contained under the “File” tab shown below.




 Auditing data in Excel
                                                                               Page 155
 worksheets
Access Databases and Excel Workbooks Audit Commands




The processing consists of the following seven steps:
    1. Select the name of the directory by clicking the “Folder” button
    2. Select the file name by clicking on the name in the drop down list.
    3. Once the file name has been selected, click on the column name to select the
        information to be processed
    4. Select the command to be processed from the menu
    5. If applicable, enter any criteria to be used in narrowing the processing “Where” (help is
        available by clicking the label “Where?”)
    6. If required, enter any information in “Info” box. Note that a help description is displayed
        on the status bar to assist.
    7. Click the “Run” button




         5.6 An example
To illustrate the process, the auditor wishes to analyze information from a text file named “FA.txt”
in the directory “c:testdata” to identify fixed asset records where the fixed asset may have been
over depreciated. Below is the process, step by step.


Step 1 – select the directory

Auditing data on Excel worksheets                                                  Page 156
Access Databases and Excel Workbooks Audit Commands




The last used directory is shown and the Excel work book named fa.xls is selected.


Step 2 – select the file




Step 3 – select the column name of interest

 Auditing data in Excel
                                                                           Page 157
 worksheets
Access Databases and Excel Workbooks Audit Commands




Step 4 – select the command name to be processed




Step 5 – specify selection criteria (if any)
In this example, only the information for the location ‘ABC’ is needed.

Auditing data on Excel worksheets                                         Page 158
Access Databases and Excel Workbooks Audit Commands




Step 6 – provide any additional information required for command processing
In this example, no additional information is required.
Step 7 – click “Run”
When the button labeled “Run” is clicked, the results are written out as a text file
report and as a chart to the directory specified under the “Audit” tab.




 Auditing data in Excel
                                                                     Page 159
 worksheets
Access Databases and Excel Workbooks Audit Commands



6 Techniques for “Drill Down”


Drilling down to information of interest is enabled through the use of the “Where” information. A
separate tab is provided in order to enter the information if it is lengthy or complex.




Note: This form can also be shown by clicking on the label “Where?”.


The form is displayed.




Auditing data on Excel worksheets                                                    Page 160
Access Databases and Excel Workbooks Audit Commands




There are numerous examples of possible “where” clauses. To help, there is a drop down list of
examples which can be selected and then tailored to specific uses.




In the screen above, the auditor wishes to extract information within the last 30 days. The
example shown provides a mean to do this.


All that needs to be done now is to change the name of the column to one that is of interest
(unless the column of interest is named “acquisition”).


Below are tables which provide examples of some of the functions with a brief description. More
complex criteria can be applied using combinations of the functions or “nesting” which is
described below.
 Auditing data in Excel
                                                                             Page 161
 worksheets
Access Databases and Excel Workbooks Audit Commands




         6.1 Numeric

     Function                   Example                            Description
Numeric equality       [asset cost] = 1000          Asset cost is exactly 1,000
Greater than           [asset cost] > 1000          Asset cost is greater than 1,000
Less than              [asset cost] –               Net Asset cost is less than 1,000
                       [accumulated
                       depreciation]< 1000
Greater or equal       [asset cost] >= 1000         Asset cost is greater than or equal
Less than or equal     [sales amount] * .04 <= 10   Tax amount at 4% is less than or equal to
                                                    10
Not equal              [asset cost] <> 1000         Asset cost is not 1,000
Mod                    [asset cost] mod 10 – 2      Asset cost ends in 2
Mod                    [asset cost] mod 100 – 0     Evenly divisible by 100
Abs                    Abs([asset cost] – 100) <=   Asset cost is within $.02 of 100, i.e.
                       .02                          99.98 – 100.02
Rnd                    Rnd()                        A random number
Is numeric             Isnumeric                    Isnumeric(amount) = -1
Round                  Round(cost,2)                Round the cost to the penny



         6.2 Text

      Function                   Example                           Description
Length                 Len(location) = 6            Length of location name is six characters
Mid                    Mid(location,2,3)            Character positions 2 3 and 4
Left                   Left(location,2) = ‘AB’      Left most two characters
Right                  Right(location,2) = ‘XY’     Location name ends in XY
Instr                  Instr(location,’test’) > 0   Location contains the text ‘test’
LCase                  Lcase(lastname) = “smith’    Lower case value for last name
Ucase                  Ucase(lastname) =            Upper case values
                       ‘SMITH’
Trim                   Trim(lastname) = ‘smith’     Remove left and right blanks
Ltrim                  Ltrim(lastname)              Remove blanks on the left
Rtrim                  Rtrim(lastname)              Remove blanks on the right




Auditing data on Excel worksheets                                                  Page 162
Access Databases and Excel Workbooks Audit Commands



         6.3 Date / Time

       Function                   Example                              Description
Hour                      Obtain hour portion of        Length of location name is six characters
                          date/time value
minute                    Obtain minute portion of      Character positions 2 3 and 4
                          date/time value
second                    Obtain second portion of      Left most two characters
                          date/time value
year                      Obtain yearr portion of       Location name ends in XY
                          date/time value
month                     Obtain month portion of       Location contains the text ‘test’
                          date/time value
day                       Obtain day portion of date/   Lower case value for last name
                          time value
Weekday                   Day of week 1 – 7             Weekday(datevalue) = 1 (check for
                                                        Sunday)
Date validity             Isdate(datecol) = -1          Check for an invalid date
Difference between        DateDiff(‘d’,date1,date2)     Measure difference between dates in
dates                                                   days
Date arithmetic add       DateAdd(‘d’,5,DateValue)      Add five days to the date value
Date arithmetic add       DateAdd(‘m’,3,DateValue)      Add three months to the date
Date Part                 DatePart(‘m’,DateValue)       Obtain the month
Date Part                 DatePart(‘y’,dateValue)       Obtain the year




 Auditing data in Excel
                                                                                  Page 163
 worksheets
Access Databases and Excel Workbooks Audit Commands




         6.4 Logical tests

       Function                Example                               Description
OR                     Cost < 100 or life > 7        Test that at least one of the conditions is
                                                     true
AND                    Cost < 100 and life > 7       Test that both conditions are true
NOT                    Obtain second portion of      Left most two characters
                       date/time value
BETWEEN                Trandate between              Values between a date range
                       #7/1/2005# and
                       #6/30/2006#
BETWEEN                Amount between 100 and        Value between 100 and 900
                       900
BETWEEN                Location between ‘AB’         Value between ‘AB’ and ‘LM”
                       and ‘LM”
IN                     Location                      Value is one of three specified values
                       in(‘103’,’105’,’106’)
LIKE                   Location like ‘10%’           Location name starts with 10



         6.5 Combinations
Functions can be combined using the logical tests described in section 7.4. For example, to test
asset records acquired during a specific fiscal period which also have useful lives exceeding ten
years the criteria would be specified as follows using the “AND” connectior:


([installation date] between #7/1/2007# and #6/30/2008#) and ([useful life] > 7)




         6.6 Nesting functions
Often several functions need to be applied at the same time. For example to test if the first three
letters of the last name are ‘Bla’, without considering case the following criteria would be applied:


Auditing data on Excel worksheets                                                   Page 164
Access Databases and Excel Workbooks Audit Commands
Ucase(left([last name],3)) = ‘BLA’


If the last name may also have blanks to the right of the last character, then an
additional function (“trim”) could be first applied before the remaining tests:


Ucase(left(trim([last name]),3)) = ‘BLA’




        6.7 Selection criteria
There are at least three separate techniques for the identification of ranges or
multiple values:


   1. Between
   2. In
   3. Like


The between operator allows the specification of a range of values which may be
text, numeric or date – e.g.
       Between #7/1/2007# and #6/30/2008#
Between ‘A’ and ‘M’
Between 100 and 2000
The in operator allows the specification of a number of text values, each separated
by a comma, e.g. to test if a specific state code has been located:


[State Code] in (‘FL’,’GA’,’AL’,’NC’)


The like operator allows tests for patterns.


Operator                                       Meaning
[last name] like ‘BLA%’                        Last name starts with ‘BLA’


 Auditing data in Excel
                                                                      Page 165
 worksheets
Access Databases and Excel Workbooks Audit Commands




Auditing data on Excel worksheets                           Page 166
Access Databases and Excel Workbooks Audit Commands

7 Appendix – Software installation


Installation of the software is a straightforward process, using the standard “Setup.exe” method.
There are two types of installs:
    1. “regular” install
    2. “silent” install


For a “silent” install, the software is installed with all the default values – no interaction is
required.


This section of the guide will discuss the “regular” install.




Double clicking the file “ACSetup.exe” brings up the splash screen asking if you wish to install
the Audit Commander.
 Auditing data in Excel
                                                                                   Page 167
 worksheets
Access Databases and Excel Workbooks Audit Commands



Step 1




Step 2




Step 3


Auditing data on Excel worksheets                           Page 168
Access Databases and Excel Workbooks Audit Commands




Step 4




Step 5




 Auditing data in Excel
                                                         Page 169
 worksheets
Access Databases and Excel Workbooks Audit Commands




Step 6




Step 7




Auditing data on Excel worksheets                           Page 170
Access Databases and Excel Workbooks Audit Commands




Step 8




 Auditing data in Excel
                                                         Page 171
 worksheets
Access Databases and Excel Workbooks Audit Commands




Auditing data on Excel worksheets                           Page 172
Access Databases and Excel Workbooks Audit Commands

8 Comment Form




     Windows version ______________________________
     Audit Commander version _______________________
     Functions described ____________________________
     Comments




          Please send any comments, suggestions or items identified as errors to:

                                Mike.Blakley@ezrstats.com

     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.




Auditing data in Excel
                                                                              Page 173
worksheets

More Related Content

PDF
Ms excel training manual
PPT
Managing experiment data using Excel and Friends
DOCX
Excel2007 analysisservicescubespivottables
PPTX
HR Supply forecasting
PPTX
Techniques for Forecasting Human Resources
PDF
Using MS Excel In Your Next Audit - Top Basic & Intermediate Techniques
PPTX
Pranavi verma-class-9-spreadsheet
PDF
A excel analysis toolpack -best
Ms excel training manual
Managing experiment data using Excel and Friends
Excel2007 analysisservicescubespivottables
HR Supply forecasting
Techniques for Forecasting Human Resources
Using MS Excel In Your Next Audit - Top Basic & Intermediate Techniques
Pranavi verma-class-9-spreadsheet
A excel analysis toolpack -best

Similar to Audit Commander Worksheet analyzer (20)

PDF
Top 10 excel analytic tests to minimize fraud and process risks
PPTX
UNIT 1-Introduction to Data Science.pptx
PPTX
Operate spreadsheet application database administration .pptx
PDF
2023 Advanced Formulas for Financial Reporting in Excel
PPTX
Microsoft Excel 101: What you must know
PPTX
UNIT 1 (3).pptx....................................
PPT
Project on Electronic Spreadsheets for Students
PDF
Guide to excel
DOCX
Teaching_guide_M1.docx is a wonderfull guid line for the students.
PPT
Spreadsheet Auditing
DOC
COURSEEXCEL2010PlainandSimple
PPSX
Utilizing Pro Forma Modeling In Excel
PPT
Introduction to Spreadsheets.ppt
PPTX
Excel finishing
PPTX
data_analytics_using_caat_tools-ms_excel.pptx
PDF
#Excel Data Analysis Modeling and Simulation by Hector Guerrero (z-lib.org).pdf
PDF
I CS AI Advanced Excel Lab Manual-23UAISP21
PDF
Ms excel for Accountants
PDF
Excel Certification
PPTX
Advance excel training in pune ppt.
Top 10 excel analytic tests to minimize fraud and process risks
UNIT 1-Introduction to Data Science.pptx
Operate spreadsheet application database administration .pptx
2023 Advanced Formulas for Financial Reporting in Excel
Microsoft Excel 101: What you must know
UNIT 1 (3).pptx....................................
Project on Electronic Spreadsheets for Students
Guide to excel
Teaching_guide_M1.docx is a wonderfull guid line for the students.
Spreadsheet Auditing
COURSEEXCEL2010PlainandSimple
Utilizing Pro Forma Modeling In Excel
Introduction to Spreadsheets.ppt
Excel finishing
data_analytics_using_caat_tools-ms_excel.pptx
#Excel Data Analysis Modeling and Simulation by Hector Guerrero (z-lib.org).pdf
I CS AI Advanced Excel Lab Manual-23UAISP21
Ms excel for Accountants
Excel Certification
Advance excel training in pune ppt.
Ad

More from EZ-R Stats, LLC (7)

PDF
Audit Commander Worksheet Analyzer
PDF
Trend Line Guide
PDF
Audit Commander User Guide
PDF
Sampling
PPT
Managing The Business Risk Of Fraud
PDF
Fraud Detection Using A Database Platform
PDF
Automated Techniquesfor Detectionof Procurement Fraud
Audit Commander Worksheet Analyzer
Trend Line Guide
Audit Commander User Guide
Sampling
Managing The Business Risk Of Fraud
Fraud Detection Using A Database Platform
Automated Techniquesfor Detectionof Procurement Fraud
Ad

Recently uploaded (20)

PPTX
2025 Product Deck V1.0.pptxCATALOGTCLCIA
PPTX
operations management : demand supply ch
DOCX
Handbook of Entrepreneurship- Chapter 5: Identifying business opportunity.docx
PDF
Family Law: The Role of Communication in Mediation (www.kiu.ac.ug)
PPTX
Sales & Distribution Management , LOGISTICS, Distribution, Sales Managers
PPTX
Project Management_ SMART Projects Class.pptx
PPTX
Slide gioi thieu VietinBank Quy 2 - 2025
PDF
Susan Semmelmann: Enriching the Lives of others through her Talents and Bless...
PDF
Satish NS: Fostering Innovation and Sustainability: Haier India’s Customer-Ce...
PPTX
Negotiation and Persuasion Skills: A Shrewd Person's Perspective
PDF
Nante Industrial Plug Factory: Engineering Quality for Modern Power Applications
PPT
Lecture 3344;;,,(,(((((((((((((((((((((((
PDF
Digital Marketing & E-commerce Certificate Glossary.pdf.................
PDF
TyAnn Osborn: A Visionary Leader Shaping Corporate Workforce Dynamics
PDF
Cours de Système d'information about ERP.pdf
PDF
Module 2 - Modern Supervison Challenges - Student Resource.pdf
PPTX
Slide gioi thieu VietinBank Quy 2 - 2025
PDF
1911 Gold Corporate Presentation Aug 2025.pdf
PDF
NEW - FEES STRUCTURES (01-july-2024).pdf
PPTX
Principles of Marketing, Industrial, Consumers,
2025 Product Deck V1.0.pptxCATALOGTCLCIA
operations management : demand supply ch
Handbook of Entrepreneurship- Chapter 5: Identifying business opportunity.docx
Family Law: The Role of Communication in Mediation (www.kiu.ac.ug)
Sales & Distribution Management , LOGISTICS, Distribution, Sales Managers
Project Management_ SMART Projects Class.pptx
Slide gioi thieu VietinBank Quy 2 - 2025
Susan Semmelmann: Enriching the Lives of others through her Talents and Bless...
Satish NS: Fostering Innovation and Sustainability: Haier India’s Customer-Ce...
Negotiation and Persuasion Skills: A Shrewd Person's Perspective
Nante Industrial Plug Factory: Engineering Quality for Modern Power Applications
Lecture 3344;;,,(,(((((((((((((((((((((((
Digital Marketing & E-commerce Certificate Glossary.pdf.................
TyAnn Osborn: A Visionary Leader Shaping Corporate Workforce Dynamics
Cours de Système d'information about ERP.pdf
Module 2 - Modern Supervison Challenges - Student Resource.pdf
Slide gioi thieu VietinBank Quy 2 - 2025
1911 Gold Corporate Presentation Aug 2025.pdf
NEW - FEES STRUCTURES (01-july-2024).pdf
Principles of Marketing, Industrial, Consumers,

Audit Commander Worksheet analyzer

  • 1. Auditing Data contained in Excel Worksheets Audit Commander Audit Guide Data analysis made easier… EZ-R Stats, LLC Auditing data on Excel worksheets
  • 2. Audit Commander The software described in this document makes data analysis easier, particularly if it is contained in an Excel work book. The software may be freely downloaded and used without restriction for any purpose – commercial, educational or personal. Additional information about the audit software is available at the web site. Although a significant amount of testing has been performed, there is no guarantee that every function works as documented. All comments and suggestions are welcome. Comments The software is currently being used to teach auditing concepts, statistical sampling and data mining. EZ-R Stats, LLC is registered with the North Carolina State Board of Certified Public Accountant Examiners as a provider of Continuing Professional Education. Auditing data on Excel worksheets
  • 3. Auditing data on Excel worksheets Document History Revision History Revision Revision Date Summary of Changes Author Number 1.0 10-17-2009 Initial Version M. Blakley 1.1 11-12-2009 Trend Line and additional M. Blakley error checking. New style of input form.
  • 4. Auditing data on Excel worksheets Table of Contents 1 ABOUT THIS GUIDE................................................................................................1 1.1 Who Should Use It...........................................................................................................................................1 1.2 Typographical Conventions ...........................................................................................................................1 1.3 Purpose.............................................................................................................................................................2 1.4 Scope.................................................................................................................................................................2 1.5 Intended audience............................................................................................................................................3 1.6 Hardware requirements..................................................................................................................................3 1.7 Software requirements....................................................................................................................................3 2 GETTING STARTED.................................................................................................4 2.1 Working with Excel data.................................................................................................................................4 2.2 Audit objectives................................................................................................................................................5 2.3 Accomplishing audit objectives......................................................................................................................5 3 USING THE SOFTWARE.........................................................................................6 3.1 Opening form...................................................................................................................................................7 3.2 Analyzing data on Excel worksheets............................................................................................................10 3.2.1 Selecting the data for analysis..................................................................................................................10 3.2.2 Selecting the columns for analysis...........................................................................................................12 3.2.3 Select chart colors....................................................................................................................................14 3.2.4 Select the command to be processed........................................................................................................15 3.2.5 Specifying selection criteria.....................................................................................................................20
  • 5. Auditing data on Excel worksheets 3.2.6 The logging facility..................................................................................................................................21 4 AUDIT COMMANDS.................................................................................................1 4.1 Numeric............................................................................................................................................................2 4.1.1 Population Statistics...................................................................................................................................2 4.1.2 Round Numbers..........................................................................................................................................7 4.1.3 Benford’s Law..........................................................................................................................................11 4.1.4 Stratify......................................................................................................................................................15 4.1.5 Summarization..........................................................................................................................................19 4.1.6 Top and Bottom 10...................................................................................................................................22 4.1.7 Histograms................................................................................................................................................25 4.1.8 Box Plot....................................................................................................................................................29 4.1.9 Random numbers......................................................................................................................................33 4.2 Date.................................................................................................................................................................37 4.2.1 Holiday Extract.........................................................................................................................................37 4.2.2 Week days.................................................................................................................................................41 4.2.3 Holiday summary.....................................................................................................................................44 4.2.4 Ageing......................................................................................................................................................48 4.2.5 Date Near..................................................................................................................................................52 4.2.6 Date Range...............................................................................................................................................54 4.2.7 Week days Report.....................................................................................................................................56 4.3 Other...............................................................................................................................................................59 4.3.1 Gaps in Sequences....................................................................................................................................59 4.3.2 Data Extraction.........................................................................................................................................62 4.3.3 Duplicates.................................................................................................................................................66 4.3.4 Same, Same, Different..............................................................................................................................69 4.3.5 Trend Lines...............................................................................................................................................72 4.3.6 Time Line analysis....................................................................................................................................75 4.3.7 Confidence Band......................................................................................................................................82 4.3.8 Confidence Band (Time Series)...............................................................................................................85 4.3.9 Invoice Near Miss....................................................................................................................................89 4.3.10 Split Invoices..........................................................................................................................................92 4.3.11 Check SSN..............................................................................................................................................94 4.3.12 Check PO Box........................................................................................................................................97
  • 6. Auditing data on Excel worksheets 4.3.13 Calculated Values.................................................................................................................................100 4.3.14 Fuzzy Match (LD)................................................................................................................................103 4.3.15 Fuzzy Match (Regular Expression)......................................................................................................105 4.3.16 Sequential Invoices...............................................................................................................................108 4.4 Patterns.........................................................................................................................................................110 4.4.1 Round Numbers......................................................................................................................................110 4.4.2 Data Stratification...................................................................................................................................114 4.4.3 Day of Week...........................................................................................................................................117 4.4.4 Holidays..................................................................................................................................................120 4.4.5 Benford’s Law........................................................................................................................................123 4.5 Sampling.......................................................................................................................................................126 4.5.1 Attributes – Unrestricted: Stop and Go..................................................................................................126 4.5.2 Variable Sampling – Unrestricted Stop and Go......................................................................................133 4.5.3 Stratified Variable Sampling – Population.............................................................................................139 4.5.4 Stratified Variable Sampling – Assessment............................................................................................142 4.5.5 Stratified Attribute Sampling – Population............................................................................................144 4.5.6 Stratified Attribute Sampling – Assessment...........................................................................................147 5 ACCESS DATABASES AND EXCEL WORKBOOKS.........................................149 5.1 Overview.......................................................................................................................................................149 5.2 The “Excel/Access” menu item...................................................................................................................150 5.3 An example...................................................................................................................................................151 5.4 Working with text files................................................................................................................................155 5.5 The “File” tab...............................................................................................................................................155 5.6 An example...................................................................................................................................................156 6 TECHNIQUES FOR “DRILL DOWN”..................................................................160 6.1 Numeric........................................................................................................................................................162 6.2 Text................................................................................................................................................................162
  • 7. Auditing data on Excel worksheets 6.3 Date / Time...................................................................................................................................................163 6.4 Logical tests..................................................................................................................................................164 6.5 Combinations...............................................................................................................................................164 6.6 Nesting functions..........................................................................................................................................164 6.7 Selection criteria..........................................................................................................................................165 7 APPENDIX – SOFTWARE INSTALLATION........................................................167 8 COMMENT FORM ...............................................................................................173
  • 8. 1 About this guide This document is divided into the following chapters: • Chapter 1 – Overview • Chapter 2 – Getting started • Chapter 3 – Auditing data on Excel work sheets • Chapter 4 –The commands and how to use them • Chapter 5 –Access databases and Excel workbooks • Chapter 7 –“Drill down” • Appendix – Software installation 1.1 Who Should Use It Auditors, researchers, business analysts and academics who use data analysis to perform their jobs. • Auditors: can use the software to for a variety of common audit tasks. Altogether, over 40 useful analytical audit functions are included • Researchers: use the software for: • Data analysis, trend investigation • Preparation of statistical reports and charts 1.2 Typographical Conventions This document uses the following typographical conventions: Auditing data on Excel worksheets Page 1
  • 9. Auditing data on Excel worksheets • Command and option names appear in bold type in definitions and examples. • Screen output and code samples appear in mono space type. 1.3 Purpose The purpose of this monograph is to provide a practical guide to auditing data contained on Excel work sheets using the Audit Commander. Over 40 useful audit tests and data analyzes can be performed. Although the primary source of data will be that contained on Excel work sheets, the technique described also applies to certain other data sources such as Excel workbooks, Access databases, as well as text files that are in a specific format (“tab separated values”). The auditor does not need special computer skills in order to be able to perform these tests because they are largely menu driven with “fill in the blanks”. Development of the software began in August 2005 when the author searched fruitlessly for a relatively easy to use, economical software package for analyzing data on Excel work sheets (and other). During its development, suggestions and improvements were made by a variety of audit practitioners. More information about the system is available from the website, More information is also available about the author. 1.4 Scope This guide explains how to install the software, the general purpose of the functions provided, as well as examples of use. Auditing data on Excel worksheets Page 2
  • 10. Auditing data on Excel worksheets 1.5 Intended audience The software is intended for use by both internal and external auditors, researchers, program monitors, students learning data analysis, business analysts and anyone else interested in analyzing data contained on Excel work sheets in a more efficient and effective manner. 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) Auditing data in Excel Page 3 worksheets
  • 11. Auditing data on Excel worksheets 2 Getting Started 2.1 Working with Excel data Although Excel is a powerful tool, some audit analyzes are difficult or time consuming to perform. The worksheet analyzer is a stand-alone program which is suitable for performing more than 30 of the most commonly needed analytical tests. This program also includes very powerful “drill- down’ capabilities to enable the auditor or researcher to quickly isolate and locate the data that is of special interest. This system does not require that the data be pre-sorted or specially formatted. The worksheet analyzer is generally used to analyze all or portions of single Excel spread sheets. However, it can also be used to analyze data contained within MS-Access databases, as well as text files in various formats (e.g. comma separated values, tab separated values, print format, etc.) The worksheet analyzer derives much of its capabilities by leveraging the software provided by Microsoft called “ActiveX Data Objects” which provides significant database capabilities. These database capabilities are in turn incorporated into and used by the software to provide a variety of capabilities of special interest to auditors and data analysts. The primary advantages of the Work sheet analyzer include: • Pre-built functions for the most common audit tasks • Significantly reduced time required to perform more complex extracts and analyzes • No need to “pre-sort” the data • Built-in help functions to simplify the process • Small footprint - doesn’t require a lot of screen “real estate” Auditing data on Excel worksheets Page 4
  • 12. Auditing data on Excel worksheets • Logging facility – log work performed, can be shared or used as a basis for future analysis The primary disadvantages of the Work sheet analyzer include : • Is not completely “bullet proof” (some mistyped commands cause it to crash) • Much slower with Excel 2007 than Excel 2003 • Computations for attribute sampling are slow with populations > 1,000 2.2 Audit objectives As each available command is presented, one or more examples of specific audit objectives which might be accomplished using that command will be included and discussed. Often entire audit steps can be accomplished using the commands built into the system 2.3 Accomplishing audit objectives Often, data being audited is available in Excel worksheets, after it has been extracted or downloaded from various data sources. Once this data has been loaded onto one or more Excel work sheets, the analyst should often perform a variety of tests in order to be able to arrive at an audit conclusion. Auditing data in Excel Page 5 worksheets
  • 13. Auditing data on Excel worksheets 3 Using the software Although the software is a stand-alone program, by design it is intended for use with Excel, and is small enough that the form can reside along side the Excel workbook which contains the data to be examined. This is done by having both the Excel workbook open as well as the Audit Commander form on the same page while both are open. This makes it easier to transfer data back and forth between the systems while doing a review. An example screen shot is shown below to illustrate a case where a range of data on the worksheet is being analyzed. By intentionally keeping the Audit Commander form small, it becomes easier to transfer the information from the Excel work book to the form, analyze the data and then “paste” the results Auditing data on Excel worksheets Page 6
  • 14. Auditing data on Excel worksheets back into the Excel work book. Note that the results of any analysis performed are also stored in the audit directory specified, so it is not necessary to also store the results in Excel. 3.1 Opening form The opening form has three main menu items as shown below. Each of these menu items are used to provide various types of processing information in order to analyze data. The “commands” menu item is used to select the command or type of analysis to be performed. The remaining menu items are “forms” which are used to gather and process information. A summary description of the purpose of each form is provided in the table below. Tab Name Purpose Clipboard Process data that has been copied to the clipboard (generally from Excel sheets but can include others) Text files Analyze data contained in text files (e.g. comma separated value format, tab separated value format, etc.) Auditing data in Excel Page 7 worksheets
  • 15. Auditing data on Excel worksheets Excel/Access Analyzing data in Excel workbooks or Access databases Where Specifying and using more complex selection criteria Report View report produced (report is also written to a file) Chart Chart title and color scheme for chart prepared (if applicable) Audit Audit and folder information The typical sequence used for running an audit analysis of data on a worksheet is as follows: 1. If not already done, specify the location where the audit results are to be stored, along with the audit title, audit step number, etc. (“Audit” form) 2. Select the type of analysis to be performed (menu of 40+ commands) 3. Select the data to be analyzed, the columns or rows to be tested, along with any additional information required for the analysis (“Clipboard/MS/Text” form) 4. If specific criteria are to be used (i.e. the test is for an extract of the data), specify this information (“Where” tab) 5. If the data to be tested is from the clipboard, then copy the data to be tested from the worksheet. This is done by first highlighting the data, then copying it to the clipboard using methods such as 1) keyboard combination “Control-C”, 2) menu selection “Edit| Copy”, or 3) right mouse click and select “Copy”. (“Clipboard” form) 6. On the tab labeled “Form”, click the button labeled “Run” (“Clipboard” form) 7. Wait until the analysis is finished, as indicated with a status message on the Status Bar of the Audit Commander form. (“Clipboard” form) 8. View the report (“Report” tab) 9. If desired, the output in the audit folder specified may also be viewed. This includes both a text report as well as any charts prepared (if applicable). 10. Analysis report results can also be copied to the clip board (“Report” tab) 11. Change audit parameters or specify different tests and repeat the steps above Note: If the data to be tested resides in an Excel workbook, Access database or text file, then “MS” or “File” tabs are used instead. Auditing data on Excel worksheets Page 8
  • 16. Auditing data on Excel worksheets Each of these steps are illustrated below using an example analysis. In this analysis, the auditor wishes to perform a test of fixed asset costs using Benford’s Law. Step 1 – Specify audit information (if not already done) Clicking on the “Audit” tab displays the information used to store the results for the analysis performed. If any of this information needs to be changed, it can be overtyped and then the button labeled “Update” clicked to store the information. The folder shown (in this case C:testtemp” is the location where the reports and graphics produced by the audit analysis will be stored. The folder name can be selected by clicking on the button labeled “Folder”, or else overtyping the name in the text box. The step number is used to uniquely identify the output. The starting step number is shown above, and will be increased by one every time a procedure is run. Once the information has been entered, click on the button labeled “Update” to save the information. An informational message will be displayed on the status bar to acknowledge that the change has been applied. This change will be in effect until the next change is applied. Warning: Existing report files and graphics can be overwritten if the starting step number is too low. Auditing data in Excel Page 9 worksheets
  • 17. Auditing data on Excel worksheets 3.2 Analyzing data on Excel worksheets Once the audit parameter information has been entered (or checked), the data analysis procedures can be performed. If the data to be analyzed is contained on an Excel worksheet, then the analysis process begins with the first tab, which is labeled “Form”. Note: If data in Excel work books, Access databases or text files are to be analyzed, the tables “MS” and “File” should be used instead. 3.2.1 Selecting the data for analysis The first step is to select the data to be analyzed. This is done by highlighting the area on the worksheet to be analyzed and then copying it to the clipboard using any of four methods: 1. Press the keyboard combination “Control – C” 2. Right mouse click and specify “Copy” Auditing data on Excel worksheets Page 10
  • 18. Auditing data on Excel worksheets Often, the data to be reviewed will be in vertical format as shown here. However, in some cases the data will be organized horizontally (e. g. in comparative financial statements). If the data is organized horizontally, then the checkbox “rows” on the main form needs to be checked before the data is “pasted” into the form. Auditing data in Excel Page 11 worksheets
  • 19. Auditing data on Excel worksheets Use the toolbar “copy” icon 3. Use the menu “Edit|Copy” 3.2.2 Selecting the columns for analysis Once the data to be analyzed has been copied to the clipboard, it can then be “pasted” onto the Audit Commander form. If the first row of the header contains column names, then the checkbox just below the “Paste” button must be checked. When the data is pasted onto the Auditing data on Excel worksheets Page 12
  • 20. Auditing data on Excel worksheets form, the column names will be placed into the drop down list so that the column to be analyzed can be selected. If the area copied does not contain column names, then leave the check box unchecked, and the system will assign column names “Col001”, “Col002” and so on. Once the data has been pasted onto the form, the name of the first column is shown, and any other column can be selected from the drop down list. For this test, the second column, named “Cost” will be selected. The test to be performed will be to identify the three largest values. So the command “Largest values” is selected from the command drop down list. If the column name is blanked out, then all the data pasted will be processed in accordance with the information below: Auditing data in Excel Page 13 worksheets
  • 21. Auditing data on Excel worksheets The option to process the entire area pasted is available only for those functions which normally process only a single column of data (list is in the table below). Depending upon the function selected, only numeric data, date data or all data will be processed. The type of data processed is shown in the table below. Command Description Type of data processed Numeric functions Benford’s law Numeric only Population statistics Numeric only Histogram Numeric only BoxPlot Numeric only TopN Numeric only BottomN Numeric only Stratify Numeric only Gaps Numeric only Date Functions Weekday Report Date only Weekday Extract Date only Holiday Report Date only Holiday extract Date only Date Near Date only Date Range Date Only Other Functions Fuzzy match – Levenshtein distance (All) Fuzzy match – regular expression (All) 3.2.3 Select chart colors For commands which produce a chart, the chart title and chart colors can be specified using the “Chart” tab. Although all commands will produce a text file report, only certain commands will also prepare a chart. Both the title of the chart and the color scheme used can be specified. The color scheme can be specified in three formats: 1. “pre-set” scheme selected from the drop down list, e.g. “fall” 2. A range of colors between two specified values, e.g. brown – light tan (Note that a dash separates the color names) 3. A range of colors specified for a numbered color group, e.g. turquoise 1 – 4. This is equivalent to the specification turquoise 1 – turquoise 4, but shorter to type. Note that only certain color names have color groups. Auditing data on Excel worksheets Page 14
  • 22. Auditing data on Excel worksheets A complete list of color names accepted by the system and how they appear can be seen. Examples of color ranges and how they appear can be seen – examples show a histogram and use a chart title which specifies the color names used in the range. Two documents showing examples are provided, both are predominantly harmonious color schemes. The first shows color ranges for colors in a tight range (conservative). This is a PDF document of 251 pages and is 8.4 MB in size. The second range of colors are less conservative, but still harmonious, and are shown on a PDF document of 226 pages which has a size of 7.6 MB. The case for chart colors can be either upper or lower case. Spaces are ignored. Thus the following three specifications are equivalent: • Turquoise 2 • TURQUOISe2 • Tur quoise 2 3.2.4 Select the command to be processed The next step is to select the command to be processed from the command menu. The commands are organized by function type. Auditing data in Excel Page 15 worksheets
  • 23. Auditing data on Excel worksheets Once the command has been selected, a help message is displayed on the status bar indicating what additional information is needed. If no additional information is needed, the status bar will read “(No additional info)” and the info text box will not be displayed. However, if additional information is required, the help message will be displayed on the status bar and the “Info” box will be displayed. The resulting form is as follows: The form now displays a fourth line called “Other info” and also displays an abbreviated help message on the status bar: “number of values, e.g. 10”. The help message indicates that the Other info is required and consists of a single value and the default value is “10”. In order words, for the largest value test, the largest 10 items will be selected. In this case, we want only the largest three values, so the number 3 is then typed into the “Other info” box. Auditing data on Excel worksheets Page 16
  • 24. Auditing data on Excel worksheets Since all the needed information has been entered, the “Run” button can be clicked in order to perform the analysis. After clicking the “Run” button, there will be a pause while the system processes the information. Once processing is complete, the location of the output file will be shown on the status bar. If a chart was also produced, it will have the same name as the output text report file, but with a suffix of “.png”. An example of the form appears as follows: As shown on the status bar, the report has been written to the file named “c:testtempstep-2.txt” in the directory requested. The initial portion of the report (up to a maximum of 2,000 characters), can also be viewed by clicking on the tab labeled “Report”. Auditing data in Excel Page 17 worksheets
  • 25. Auditing data on Excel worksheets The report lists the three lowest valued cost items in the range selected. Remaining information about these items can be viewed by scrolling the view to the right. Note that the report has also been stored in the report file specified. At this point there are several options: • Return to the “Clipboard” form and select another command to be processed, e.g. Benford’s Law test” • Return to the “Clipboard” form and select another column to be processed, e.g. “AD” (accumulated depreciation) • Return to the “Clipboard” form and “paste” another worksheet area for processing • Switch to any of the other tabs for additional processing. Go to a blank area in the current (or other) worksheet and “paste” the report results into that worksheet. Note: When a command is run, the results of that command can also be pasted to the clipboard by clicking on the “Copy” button, making it easy to do further processing or analysis by pasting this information on a worksheet. Auditing data on Excel worksheets Page 18
  • 26. Auditing data on Excel worksheets Results are written to both a text file and a chart. In the example shown, the report was written to the text file “c:testtempstep-8.txt” and a chart was produced and stored with almost the same name, i.e. “c:testtempstep-8.png”. The results were stored in the directory “c:testtemp” because that folder was specified as the Audit folder in this instance (can be changed using the “Audit” form). Auditing data in Excel Page 19 worksheets
  • 27. Auditing data on Excel worksheets For the population statistics command, the counts for positive, negative and zero amounts are shown, along with the totals. Note: The default color for the chart is blue and can be overridden using the values under the “Chart” tab. 3.2.5 Specifying selection criteria Auditing data on Excel worksheets Page 20
  • 28. Auditing data on Excel worksheets Clicking on the label named “Where?” causes the selection criteria help form above to be shown. This form is useful in reminding you of the syntax for various types of selection that can be performed. Of the templates shown, an example can be selected from the drop down list, then modified and then copied over to the main processing form. 3.2.6 The logging facility A complete record of the processing performed can be recorded automatically in a log file. The log file records the processing performed in “macro” format so that it can be re-performed at a future date or shared with others. To perform logging, only two actions are needed: Specify the name of the log file to be used (only required is a different logfile is used from prior times) For the processing performed, check the box on the form to indicate that logging is desired. This check box can be turned on and off at will. When turned off, no logging is recorded until the check box is turned back on. The primary advantages of logging are: 1. Maintain a complete record of the processing performed 2. Record processing instructions so that the actions can be re-performed, now or in the future 3. Share processing information with others 4. Document the work performed Auditing data in Excel Page 21 worksheets
  • 29. Auditing data on Excel worksheets The primary disadvantage of logging is: • Takes a minor amount of disk space and CPU cycle time Logging information is specified using the “Audit” form as shown below. Auditing data on Excel worksheets Page 22
  • 30. Auditing data in Excel workbooks 4 Audit Commands Types of queries There are some 40+ 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. Auditing data on Excel worksheets Page 1
  • 31. Audit Commands 4.1 Numeric 4.1.1 Population Statistics Population Statistics Overview / Use in Audit Procedures The population statistics command is the “work horse” of the system and can be used alone to provide information for many audit steps. Just a few examples include: • Obtaining control totals • Preparing a population distribution for sample or audit planning • Identifying counts and amounts of possible exceptions • Quantifying the number and amount of records meeting various conditions • Identifying counts and amounts of transactions within date ranges The population statistics command produces three text reports and one graphic: 1. Basic statistics 2. Histogram data 3. Percentile report Basic 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 supporting details to ledger amounts, testing for procedural compliance, etc. In the example below, a histogram chart and histogram data is to be prepared for fixed asset costs. The purpose of the procedure is to obtain an overview of the fixed assets cost information, identify potential errors or extreme values and provide information for audit planning. The statistics command can be used for a variety of purposes, including: • Obtaining counts of transactions meeting a condition or criteria Auditing data on Excel worksheets Page 2
  • 32. Audit Commands • Obtaining transaction totals • Obtaining univariate statistics for the reasonableness tests, sample planning, etc. • Obtaining histogram information • Obtaining percentile information Usage Example 1 In a test of fixed assets, determine the count and amount of fixed assets which have been over depreciated. Approach – using the “population statistics” command, obtain totals and counts where the asset cost less accumulated depreciation is less than salvage. Audit Command values Column value – Cost Text Box – (empty) Where – (cost – ad) < salvage Results Counts, totals, minimum, maximum, etc. for all assets which have been over depreciated. Usage Example 2 For the purposes of sample planning, determine the distribution of values for fixed asset costs in order to be able to plan strata to use for stratified sampling. Approach – using the “population statistics” command, obtain a histogram of fixed asset costs. Audit Command values Column value – Cost Text Box – (empty) Where – (empty) The command shown below produces three reports for cost totals for location ‘ABC’. This is a very basic example of the command. It is possible to specify considerably more complex selection criteria. In addition, it is possible to prepare statistics for certain calculated amounts that are not contained in the file or the worksheet. An example might be statistics for net book value measured by “cost – ad” (cost less accumulated depreciation. Auditing data in Excel Page 3 worksheets
  • 33. Audit Commands Output results Population Statistics Auditing data on Excel worksheets Page 4
  • 34. Audit Commands Output results (pasted into Excel work sheet) The results above were “copied” from the form and then “pasted” into a worksheet. An alternative would be to import the report as a text file into Excel. Output results Auditing data in Excel Page 5 worksheets
  • 35. Audit Commands Histograms Output results (chart) The chart below was specified using a custom color scheme and the title shown. These values are provided using the “Chart” tab on the processing form. Output results - chart Auditing data on Excel worksheets Page 6
  • 36. Audit Commands 4.1.2 Round Numbers Round numbers Overview / Use in Audit Procedures Round numbers are often an indicator of estimates, which may be appropriate in certain cases (e.g. journal entries), but not appropriate in others (e.g. purchase orders, invoices, expense reports, etc.). The system can be used to identify the extent (if any) to which round numbers are being used as well as extract data based upon types of round numbers. The system defines a round number as one which is a whole number (i.e. no pennies), and contains one or more zeros immediately to the left of the decimal point, without any intervening digits other than zero. The number of such zeros determines the “order” of the round number. The chart below indicates examples of various round numbers, as well as their “order”. If a number is not round, then it will be classified as “NR” (not round). Example Order 15,000.00 3 10 1 123.19 NR 1,000,000.00 6 20.19 NR Examples of tests which can be performed are provided below: In a test of purchase orders, determine the frequency of round numbers for purchase orders. There is an allegation relating to purchases at store number ‘123’. Approach – using the “round numbers” command, obtain frequencies for round numbers on purchase orders, classified as to type of round number. Audit Command values Column value – Purchase order amount Text Box – (empty) Where – [store number] = 123 Results Frequencies of round numbers used on purchase orders for store number 123. Usage Example 2 In a test of journal entries, determine the frequency and extent of round numbers in journal entries for transactions relating to expenses. Expense account numbers begin with the number 3 for this company . Approach – using the “round numbers” command, obtain a frequency count. Audit Command values Auditing data in Excel Page 7 worksheets
  • 37. Audit Commands Column value – Amount Text Box – (empty) Where – [account number] like ‘3%’ Results A report classifying the usage of round numbers for account numbers beginning with ‘3’ The example form below is being used to prepare a round number report for the data column named “Cost”. Auditing data on Excel worksheets Page 8
  • 38. Audit Commands Output results Round numbers Output results (pasted into Excel work sheet) Round Number report: d-stat: .003704 Digits Count Pct Not Round 3,660 90.37% 1 354 8.74% 2 34 0.84% 3 2 0.05% Totals 4,050 100.00% The report indicates that just a little under 10% of the numbers are round. The largest order of round numbers is 3 (and there are two such numbers). The “d-stat” value of “.003704 is a measure of the difference between the expected number of round numbers and the actual number found. The d-stat value ranges from a low of zero (indicating conformity with that expected) to a high of one (indicating a significant difference between observed and expected). Output results Auditing data in Excel Page 9 worksheets
  • 39. Audit Commands Round numbers Output results (chart) The chart below was specified using a custom color scheme and the title shown. These values are provided using the “Chart” tab on the processing form. Output results - chart Auditing data on Excel worksheets Page 10
  • 40. Audit Commands 4.1.3 Benford’s Law Benford’s Law 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. The test should only be applied to numeric values which would be expected to adhere to that expected using Benford’s Law. More information is available about Benford’s law and its use. There are six types of tests which can be performed for Benford’s Law: 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 Usage Example 1 In a test of physical inventory counts, determine if some of the counts may have been made up. It is expected that actual inventory counts would follow Benford’s law, i.e. a frequency distribution of inventory counts would align with that expected using Benford’s law. There is an allegation relating to counts at warehouse 5713. Approach – using the “benford” command, obtain frequencies for physical inventory counts and compare those with that expected using benford’s law Audit Command values Column value – Inventory count Text Box – F1 Where – [warehouse] = 5713 Results Frequencies of first digits of inventory counts, along with a chart and analysis comparing the results with that expected using benford’s law. Usage Example 2 In a test of accounts payable, determine if particular vendor invoices have leading digit frequencies as Auditing data in Excel Page 11 worksheets
  • 41. Audit Commands would be expected using benford’s law. The vendors in question all have vendor numbers starting with the letters “R” – “V”. Approach – using the “benford” command, obtain a frequency count. Audit Command values Column value – [Invoice Amount] Text Box – F1 Where – [Vendor number] like ‘[R-V]% In the example below, the auditor is testing whether the first digits of the column named cost adhere with that expected using benford’s Law. Output results Benford’s Law Auditing data on Excel worksheets Page 12
  • 42. Audit Commands Output results (pasted into Excel work sheet) Benford Report High digit 3 Chisq 730.89 p-value 0 df 8 D-stat 0.2641 Digit Observed Expected 1 473 1,219 2 432 713 3 464 506 4 463 392 5 435 321 6 419 271 7 454 235 8 456 207 9 454 185 The output results include both the expected and observed vales. Both a chi squared value and a d-stat are provided to measure the difference and assess it. Here the large chi squared value indicates that the data values do not conform with that expected using Benford’s law. Visually, this can be confirmed based upon the chart which is also produced and shown below. Output results Auditing data in Excel Page 13 worksheets
  • 43. Audit Commands Benford’s Law Output results (chart) The chart below was specified using a custom color scheme and the title shown. These values are provided using the “Chart” tab on the processing form. The chart indicates that the data distribution is fairly uniform (shown in the light tan) and differs significantly from that which would be expected using Benford’s Law (shown in darker tan). The Chi Square value is shown on the chart. Note that different chart colors and titles may be specified under the “Chart” tab on the form. Output results - chart Auditing data on Excel worksheets Page 14
  • 44. Audit Commands 4.1.4 Stratify Data stratification 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. The values to be used for the strata (specified in ascending order and separated by commas or 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 ranges 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. Do not include commas within a single value – e.g. specify 1000 NOT 1,000 Usage Example 1 In a test of accounts payable, classify the invoice amounts into particular ranges for the purpose of audit planning. Invoices less than $100 do not require a secondary authorization. Invoices over $50,000 requires three authorizations. All invoices over $2,500 require a purchase order. Approach – using the “stratify” command, obtain frequencies and totals for invoices classified into various numeric ranges. Audit Command values Column value – Inventory amount Text Box – -5000 -500 0 100 500 2500 30000 50000 100000 Where – (empty) Results The invoice amounts for each range specified are totaled and counted. Invoices for less than - $5,000 or ore than $100,000 (the extreme values) are tallied separately. Usage Example 2 Auditing data in Excel Page 15 worksheets
  • 45. Audit Commands In a test of accounts payable, stratify the amounts of invoices for sample planning. One objective of the analysis is to classify the amounts such that 80% of the value can be tested with one procedure and the remaining 20% with another audit procedure. Only invoices at location ABC are to be classified. Approach – using the “stratify” command, obtain a data stratification. Audit Command values Column value – [Invoice Amount] Text Box – 0 500 20000 50000 100000 Where – location = ‘ABC’ Results A report classifying the invoice amounts at location ‘ABC’ into the ranges specified. The results also include a chart. Data stratification Auditing data on Excel worksheets Page 16
  • 46. Audit Commands Output results (pasted into Excel work sheet) Summary for Strata -100 0 100 200 500 1000 5000 7000 9000 12000 Start End Count Amount Pct Cumulative Below Below 0 0 0 0 -100 0 0 0 0 0 0 100 31 1,440.00 0.0001 0.0001 100 200 47 7,345.99 0.0004 0.0004 200 500 108 39,520.48 0.0019 0.0024 500 1000 190 143,419.53 0.007 0.0094 1000 5000 1,665 5,017,302.18 0.2465 0.2559 5000 7000 772 4,624,456.00 0.2272 0.4831 7000 9000 826 6,616,229.14 0.3251 0.8082 9000 12000 411 3,903,915.96 0.1918 1 Above Above 0 0 0 1 Totals totals 4,050 20,353,629.28 Output results Auditing data in Excel Page 17 worksheets
  • 47. Audit Commands Data stratification Output results (chart) The chart below was specified using a custom color scheme and the title shown. These values are provided using the “Chart” tab on the processing form. Output results - chart Auditing data on Excel worksheets Page 18
  • 48. Audit Commands 4.1.5 Summarization Data summarization The summarization function obtains not only totals by each control break (sort key) 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 (sort key) 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”. Usage Example 1 The auditor wishes to summarize sales by region and store in order to identify both the totals, as well as the ranges of values at these stores, i.e. largest single amount and smallest single amount. Approach – using the “summary” command, obtain totals, counts, minima, maxima, standard deviation, average. Audit Command values Column value – Sales amount Text Box – region, store Where – (empty) Results The summarized amount by store by region is produced, showing also the averages, minima, maxima, standard deviation, etc. Usage Example 2 Expense report information is available and includes employee number, region, expense type and expense date. The auditor wishes to summarize expense report costs , by region and employee number for the month of June, for travel expenses only (i.e. expense type = “travel”). Approach – using the “summary” command, obtain a data summarization. Audit Command values Auditing data in Excel Page 19 worksheets
  • 49. Audit Commands Column value – [Expense Amount] Text Box – Region, [employee number] Where – [expense type] = ‘travel’ and month([expense date]) = 6 Results A report summarizing all travel amounts for the month of June, by region and employee. In addition to summaries, counts, minima, maxima, averages and standard deviations are shown. A simpler example is shown in the example below – summarize cost by location and life. All rows are to be summarized. Output results Data summarization Auditing data on Excel worksheets Page 20
  • 50. Audit Commands Output results (pasted into Excel work sheet – not all is shown) Stand- Minim- ard De- location life Total Average um Maximum Count viation AB 1 1 1 1 1 1 1 AB 2 2 2 2 2 1 1 AB 13 13 13 13 13 1 1 ABC 3 648 3 3 3 216 0 ABC 4 992 4 4 4 248 0 1,285.0 ABC 5 0 5 5 5 257 0 1,572.0 ABC 6 0 6 6 6 262 0 1,722.0 ABC 7 0 7 7 7 246 0 2,088.0 ABC 8 0 8 8 8 261 0 2,115.0 ABC 9 0 9 9 9 235 0 2,160.0 ABC 10 0 10 10 10 216 0 2,497.0 ABC 11 0 11 11 11 227 0 3,132.0 ABC 12 0 12 12 12 261 0 CDS 3 45 3 3 3 15 0 CDS 4 60 4 4 4 15 0 CDS 5 80 5 5 5 16 0 CDS 6 108 6 6 6 18 0 CDS 7 105 7 7 7 15 0 CDS 8 96 8 8 8 12 0 CDS 9 162 9 9 9 18 0 CDS 10 170 10 10 10 17 0 Output results Auditing data in Excel Page 21 worksheets
  • 51. Audit Commands 4.1.6 Top and Bottom 10 Top and Bottom 10 (Extreme values) The Top and Bottom 10 commands are used to identify the largest (or smallest) numeric, date or text values from a population (and criteria can be applied). The number of items to be identified can be specified as any value. Generally the command is used to identify extremes among the following types of data: • For numeric values, identify unusually large (or small) items, possible outliers or to focus on just the most significant dollar items. • For date values, identify the latest (or earliest) dates in order to identify date ranges, transactions outside the cutoff date, etc. • For text values, identify high (or low) values of text as would be shown had the data been sorted. Note that the data being analyzed does not need to be presorted. Analysis of subsets of the data can be readily performed. For example, the auditor may wish to know the smallest fixed asset costs for those assets with a useful life of seven years or more and located within one or more regions or states. Other types of criteria can also be applied, depending upon what the analyst wishes to accomplish. Usage Example 1 For purposes of audit testing, the 10 fixed assets with the largest cost need to be identified, but only for assets located in either Florida, Alabama or Georgia. Approach – using the “topn” command, list the details pertaining to the ten asset records having the largest cost. Note that the input data does not need to be pre-sorted. Audit Command values Column value – asset cost Text Box – 10 Where – location in(‘FL’,’GA’,’AL’) Results A list of the fixed asset records for the ten assets having the greatest cost in any of the three states specified. Auditing data on Excel worksheets Page 22
  • 52. Audit Commands Usage Example 2 Identify the first five assets which have a net negative book value Approach – using the “bottomn” command, list the details pertaining to the ten asset records having the least net book value. This will include any which have a negative net book value. Note that the input data does not need to be pre-sorted. Audit Command values Column value – [asset cost] – [accumulated depreciation] Text Box – 5 Where – (empty) Results A list of the fixed asset records for the 5 assets having the smallest net book value (which will include negative values if there are any). In the example below, the auditor wishes to identify the ten asset records which have the largest cost amounts. Output results Auditing data in Excel Page 23 worksheets
  • 53. Audit Commands Top and Bottom 10 (Extreme values) Output results (pasted into Excel work sheet) – first ten rows in descending order (not all columns shown) Cost TagNo AD Replace Bookval Salvage Depr Life Location 9997 2665 4019.164 2999 5977.84 1999 803.8328 4 DFS 9995 9747 4065.581 2998 5929.42 1999 813.1162 12 ABC 9994.99 2204 4070.435 2998 5924.56 1999 814.0869 10 ABC 9994 9091 4033.723 2998 5960.28 1999 806.7445 12 ABC 9994 3619 4052.277 2998 5941.72 1999 810.4555 9 DFS 9991 5778 4055.282 2997 5935.72 1998 811.0564 7 GSE 9990 5461 4019.03 2997 5970.97 1998 803.806 7 ABC 9988 879 4046.362 2996 5941.64 1998 809.2724 6 XZS 9977 2054 4014.101 2993 5962.9 1995 802.8203 4 ABC 9975 6887 4015.735 2992 5959.27 1995 803.147 12 ABC The records with the largest ten asset costs are shown, listed in descending order. Note that if the data pasted did not have column headers, then the largest values would shown in the leftmost column. For example, if an area of six columns (with no column headers) were pasted and column three (“Col003”) were selected, then the results would be shown with Column3 as the first column, followed by Column 1, 2, 4, 5 and 6. Output results Auditing data on Excel worksheets Page 24
  • 54. Audit Commands 4.1.7 Histograms Histograms Histograms provide a visual representation for the values or transactions being analyzed. The results are identical to that of the population statistics, and boxplot commands, except that a different chart is produced. Three reports are produced: 1. Basic statistics 2. Histogram data 3. Percentile report Basic 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 supporting details to ledger amounts, testing for procedural compliance, etc. Examples of basic statistics reports can be found in the work papers referenced below: Usage Example 1 For purposes of audit testing, prepare a histogram of employee expense report amounts. Approach – using the “histo” command, prepare a chart and detail report as to expense report amounts at region XYZ. Audit Command values Column value – [expense report amount] Text Box – (empty) Where – region = ‘XYZ’ Results A histogram chart of expense report amounts at region XYZ, along with a text report containing the numeric values. Usage Example 2 For purposes of testing inventory values, prepare a histogram of inventory unit cost amounts. Auditing data in Excel Page 25 worksheets
  • 55. Audit Commands Approach – using the “histo” command, prepare a chart and detail report as to inventory unit cost amounts. Audit Command values Column value – [inventory cost] Text Box – (empty) Where – (empty) Results A histogram chart of unit inventory costs, along with a text report containing the numeric values. Where – (empty) Results The invoice amounts for each range specified are totaled and counted. Invoices for less than - $5,000 or ore than $100,000 (the extreme values) are tallied separately. The example below shows a histogram of cost values is to be prepared. Output results Histograms Auditing data on Excel worksheets Page 26
  • 56. Audit Commands Output results (pasted into Excel work sheet) Histogram Report Bin Start End Count Amount 1 1 834 146 29,783.99 2 834 1,667.00 332 276,601.51 3 1,667.00 2,500.00 352 586,450.00 4 2,500.00 3,333.00 329 826,848.02 5 3,333.00 4,166.00 357 1,188,139.13 6 4,166.00 4,999.00 337 1,399,458.47 7 4,999.00 5,832.00 355 1,773,214.05 8 5,832.00 6,665.00 325 1,895,888.28 9 6,665.00 7,498.00 318 2,124,745.17 10 7,498.00 8,331.00 335 2,517,380.31 11 8,331.00 9,164.00 348 2,899,833.39 12 9,164.00 9,997.00 516 4,835,286.96 Totals: 4,050 20,353,629.28 The data for the histogram includes both counts and amounts. The counts are plotted on the chart which is prepared. Output results Auditing data in Excel Page 27 worksheets
  • 57. Audit Commands Histograms Output results (chart) The chart below was specified using a custom color scheme and the title shown. These values are provided using the “Chart” tab on the processing form. This chart indicates that the most common values are those between 9,164 and 9,997. The fewest counts are between the values of 1 and 834. Output results - chart Auditing data on Excel worksheets Page 28
  • 58. Audit Commands 4.1.8 Box Plot Box Plot 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. Except for the chart, the command is identical to the Population statistics and the histogram command. Usage Example 1 As part of an audit of accounts payable, the range of invoice costs needs to be determined. Approach – using the “boxplot” command, prepare a chart and detail report as to invoice costs for invoices dated after 6/30/2008. Audit Command values Column value – [invoice amount] Text Box – (empty) Where – [invoice date] > #6/30/2008# Results A box plot chart of invoice amounts for invoices dated after 6/30/2008, along with a text report containing the numeric values. Usage Example 2 Daily sales ranges needs to be determined for a particular store. Approach – using the “boxplot” command, prepare a chart and detail report as to daily sales ranges at store ABC. Audit Command values Column value – [sales total] Text Box – (empty) Where – [store number] = ‘ABC’ Results A box plot chart of daily sales ranges, along with a text report containing the numeric values. The example below will prepare a box plot of cost values for all transactions. This plot could have been narrowed down by specifying the “Where” information. Auditing data in Excel Page 29 worksheets
  • 59. Audit Commands Output results Box Plot Auditing data on Excel worksheets Page 30
  • 60. Audit Commands Output results (pasted into Excel work sheet) Percentiles: P 1.0% : 125 P 5.0% : 542 P 10.0% : 1,064.99 P 25.0% : 2,579.00 P 50.0% : 4,960.00 P 75.0% : 7,559.00 P 90.0% : 9,027.00 P 95.0% : 9,503.00 P 99.0% : 9,902.00 Inter quartile range: 4,980.00 The values above are a portion of the data as it appears when pasted into Excel. This report is the same as that for the population statistics and the histogram commands. Output results Auditing data in Excel Page 31 worksheets
  • 61. Audit Commands Box Plot Output results (chart) The chart below was specified using a custom color scheme and the title shown. These values are provided using the “Chart” tab on the processing form. Output results - chart Auditing data on Excel worksheets Page 32
  • 62. Audit Commands 4.1.9 Random numbers Random numbers are commonly required as part of the sampling process. Excel has a built in function for the generation of random numbers, “=RAND()”. The Excel RAND function generates pseudo random numbers evenly distributed between 0 and 1. For many purposes, the pseudo random number generated using the RAND function may be adequate. Microsoft documentation at http://support.microsoft.com/support/kb/articles/q86/5/23.asp (knowledge base article Q86523 ) describes the process used. The starting number is determined based upon the time of day. The RAND function is just one of a number of random number generators (RNG). The quality of a random number generator can be tested using the “DieHard” test suite developed by the National Institute of Standards (NIST). More information is available at http://csrc.nist.gov/groups/ST/toolkit/rng/batteries_stats_test.html. One of the free random number generators is called the Mersenne Twister. The following description is provided from Wikipedia on the Mersenne Twister “The Mersenne twister is a pseudorandom number generator developed in 1997 by Makoto Matsumoto (松本 眞?) and Takuji Nishimura (西村 拓士?)[1] that is based on a matrix linear recurrence over a finite binary field F2. It provides for fast generation of very high-quality pseudorandom numbers, having been de- signed specifically to rectify many of the flaws found in older algorithms. Its name derives from the fact that period length is chosen to be a Mersenne prime. The commonly used variant of Mersenne Twister, MT19937 has the following desirable properties: 1. It was designed to have a period of 219937 − 1 (the creators of the algorithm proved this property). In practice, there is little reason to use a larger period, as most ap- plications do not require 219937 unique combinations (219937 is approximately 4.3 × 106001; Auditing data in Excel Page 33 worksheets
  • 63. Audit Commands this is many orders of magnitude larger than the estimated number of particles in the ob- servable universe, which is 1087). 2. It has a very high order of dimensional equidistribution (see linear congruential generator). This implies that there is negligible serial correlation between successive val- ues in the output sequence. 3. It passes numerous tests for statistical randomness, including the Diehard tests. It passes most, but not all, of the even more stringent TestU01 Crush randomness tests. The Mersenne Twister algorithm has received some criticism in the computer science field, notably by George Marsaglia. These critics claim that while it is good at generating random numbers, it is not very elegant and is overly complex to implement.” Generation of random numbers using Audit Commander is done using the “random” command. A seed value consisting of an integer value between 1 and 2,147,483,647 is used to determine the starting random number. The random numbers generated will consist of uniformly distributed numbers between zero and one. Usage Example 1 For purposes of sampling, generate and assign random numbers to each row of data contained on an Excel work sheet. The starting seed number to be used is 102935427. Command – “random” Column name – “N/A” TextBox – “102935427” Results – An additional column named “Random” is created with a value on the rightmost column between zero and 1. This is a pseudo random number generated using the Mersenne twister algorithm based upon the seed number provided. Random numbers Auditing data on Excel worksheets Page 34
  • 64. Audit Commands The example command shown on the next page adds a random number value in the rightmost column. This random number will be between 0 and 1 (exclusive). The starting number is based upon the seed value provided (in this case 1738974 ). The seed value should be a whole number between 1 and approximately 2.1 billion. Random numbers Auditing data in Excel Page 35 worksheets
  • 65. Audit Commands Output results (pasted into Excel work sheet – highlighting added for effect, not all columns shown) Life Location Acquisition Accode DispDate Random number 7 DEF 5/17/2008 7:40 A 0 0.974683138 8 DEF 12/19/2001 A 0 0.961858645 12 DEF 1/5/2008 11:31 A 0 0.209254051 3 DEF 10/12/2009 16:33 A 0 0.451545258 8 DEF 11/20/2008 11:16 A 0 0.362094671 10 DEF 1/31/2007 6:00 A 0 0.010547096 5 DEF 8/21/2010 21:21 A 0 0.784745319 4 DEF 3/14/2000 15:07 A 0 0.269402404 3 DEF 4/4/2001 8:38 A 0 0.417646239 3 DEF 7/31/2006 6:57 A 0 0.578761123 8 DEF 11/30/2008 9:07 A 0 0.590210739 9 DEF 1/21/2004 8:09 A 0 0.690726882 7 DEF 7/29/2010 23:31 A 0 0.902005128 8 DEF 8/12/2000 19:12 A 0 0.361275228 7 DEF 7/23/2002 9:07 A 0 0.456829664 8 DEF 5/8/2001 9:07 A 0 0.503349514 8 DEF 4/13/2010 15:36 A 0 0.119554142 9 DEF 9/9/2010 15:07 I 0 0.602501919 7 DEF 12/16/2003 6:57 A 0 0.820769995 7 DEF 6/22/2006 18:28 A 0 0.944822744 Output results Auditing data on Excel worksheets Page 36
  • 66. Audit Commands 4.2 Date 4.2.1 Holiday Extract Holiday Extract 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. Usage Example 1 In a test of general ledger, an extract of all journal postings on a federal holiday needs to be obtained. Approach – using the “holiday” command, extract a list of all journal entries posted on holidays. The date format being used is month – day – year (mdy). Audit Command values Column value – [journal posting date] Text Box – mdy Where – (empty) Results A list of any journal entry transactions which have been posted on a date which is a federal holiday. In addition, a summary chart of holiday transactions is prepared. Usage Example 2 Determine if any receiving reports exist for dates falling on a federal holiday. Date format is mdy. Approach – using the “holiday” command, extract a list of receiving transactions falling on a federal holiday. Audit Command values Auditing data in Excel Page 37 worksheets
  • 67. Audit Commands Column value – [receiving report date] Text Box – mdy Where – (empty) Results A list of any receiving report transactions which occurred on a federal holiday. In addition, a summary chart of holiday transactions is prepared. 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 no values are specified. The command example below checks for any records which have an acquisition date falling on a federal holiday in the United States. Output results Holiday Extract Auditing data on Excel worksheets Page 38
  • 68. Audit Commands Output results (pasted into Excel work sheet – not all rows and columns are shown, highlighting added for emphasis) AcqDate TagNo Cost AD Replace Bookval Salvage Depr 11/24/2005 1939 6199 2539.986 1860 3659.01 1240 507.9973 1/17/2005 4982 8649 3488.15 2595 5160.85 1730 697.63 1/17/2005 4759 8649 3488.15 2595 5160.85 1730 697.63 5/28/2007 3740 4993 2040.753 1498 2952.25 999 408.1506 7/4/2005 2392 9223 3728.142 2767 5494.86 1845 745.6284 1/2/2006 3543 4267 1726.003 1280 2541 853 345.2006 10/9/2006 2344 7175 2929.244 2152 4245.76 1435 585.8487 1/2/2006 4754 9473 8400 2842 1073 1895 1680 11/24/2005 4887 9867 4009.78 2960 5857.22 1973 801.956 2/19/2007 2035 1615 654.74 484 960.26 323 130.948 11/10/2006 4215 3776 1521.438 1133 2254.56 755 304.2876 10/10/2005 3475 9503 3845.354 2851 5657.65 1901 769.0709 1/1/2007 3166 7941 3240.535 2382 4700.46 1588 648.1071 11/11/2004 3197 2179 889.3601 654 1289.64 436 177.872 2/19/2007 1224 3424 1375.961 1027 2048.04 685 275.1921 12/31/2004 1353 3912 2920 1174 992 782 584 2/19/2007 4232 4544 1835.211 1363 2708.79 909 367.0423 2/20/2006 4194 3068 1251.079 920 1816.92 614 250.2158 12/31/2004 4107 1785 714.4909 536 1070.51 357 142.8982 12/25/2006 5243 1518 614.6649 455 903.34 304 122.933 9/4/2006 5193 6506 2652.665 1952 3853.33 1301 530.5331 Output results Auditing data in Excel Page 39 worksheets
  • 69. Audit Commands Holiday Summary Output results (chart) The chart below was specified using a custom color scheme and the title shown. These values are provided using the “Chart” tab on the processing form. This chart indicates that the most frequent holiday for asset acquisitions was President’s Day (19 instances). Output results - chart Auditing data on Excel worksheets Page 40
  • 70. Audit Commands 4.2.2 Week days Week days In 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. Usage Example 1 In a test of certain expense, an extract is needed for expenses incurred on a Friday or Saturday. Approach – using the “wd” command, extract a list of all such transactions. The date format being used is month – day – year (mdy). Audit Command values Column value – [expense date] Text Box – Friday, saturday Where – (empty) Results A list of any expense transactions which fell on a Friday or Saturday are prepared. Usage Example 2 An audit test is to be performed to identify any travel expense transactions on Saturdays, which is not allowed at this company. Approach – using the “wd” command, extract a list of all such transactions. The date format being used is month – day – year (mdy). Audit Command values Column value – [expense date] Text Box –Saturday Where – [travel code] = ‘airline’ Results A list of any expense transactions which fell on a Saturday is prepared. The day of the week must include at least the first three letters of the week day name. case does not matter. Thus, Sunday could be specified using any of the following: “sun”, “Sunday”, “sund”, etc. The example below is used to extract all transactions which fall on either a Saturday or a Monday. Note that additional selection criteria could have been applied, e.g. store = ‘ABC’ to isolate the extract to just Auditing data in Excel Page 41 worksheets
  • 71. Audit Commands those transactions at store ‘ABC’. Similarly a date range could have also been applied, e.g. acqdate between #7/1/2005# and #9/30/2005#. When specifying dates as part of the extract criteria, the date value must be enclosed in pound signs (‘#’). Output results Week days Auditing data on Excel worksheets Page 42
  • 72. Audit Commands Output results (pasted into Excel work sheet – not all rows and columns are shown) AcqDate TagNo Cost AD Replace Bookval Salvage Depr Life 5/26/2007 2547 8258 3346.594 2477 4911.41 1652 669.3188 9 3/4/2006 1299 -3115 1253.43 934 1861.57 623 250.6859 12 3/6/2006 2881 2244 905.4028 673 1338.6 449 181.0806 8 3/17/2007 2791 3039 2431 912 608 608 761.4 12 12/19/2005 4163 3048 1223.804 914 1824.2 610 244.7607 4 4/8/2006 5205 1165 932 350 233 233 95.43749 8 7/10/2006 4219 2500 1022.871 750 1477.13 500 204.5741 3 6/24/2006 3112 1131 460.5792 339 670.42 226 92.11584 3 2/26/2005 1921 7527 3033.435 2258 4493.57 1505 606.6869 4 9/19/2005 4857 6106 2448.247 1832 3657.75 1221 489.6493 9 5/2/2005 2391 4339 1745.635 1302 2593.37 868 349.1269 8 7/17/2006 2205 7858 3195.106 2357 4662.89 1572 639.0212 5 1/20/2007 1639 7073 2870.923 2122 4202.08 1415 574.1847 6 4/16/2007 4964 2410 975.3022 723 1434.7 482 195.0604 7 6/19/2006 4185 6705 2715.957 2012 3989.04 1341 543.1915 4 9/18/2006 4673 7966 3233.326 2390 4732.67 1593 646.6653 3 11/6/2006 3363 6586 2658.405 1976 3927.6 1317 531.6809 3 1/17/2005 4982 8649 3488.15 2595 5160.85 1730 697.63 9 1/27/2007 1501 521 208.4521 156 312.55 104 41.69043 12 3/28/2005 3965 1775 715.3794 532 1059.62 355 143.0759 10 1/17/2005 4759 8649 3488.15 2595 5160.85 1730 697.63 9 1/27/2007 3743 521 208.4521 156 312.55 104 41.69043 12 3/28/2005 5045 1775 715.3794 532 1059.62 355 143.0759 10 11/22/2004 1870 2589 1060.414 777 1528.59 518 212.0829 6 12/5/2005 3391 795 322.078 238 472.92 159 64.4156 5 12/11/2006 5140 4897 1989.455 1469 2907.55 979 397.891 6 5/7/2005 2589 5555 2229.728 1666 3325.27 1111 445.9457 10 Output results Auditing data in Excel Page 43 worksheets
  • 73. Audit Commands 4.2.3 Holiday summary Holiday Summary 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. Usage Example 1 In a test of general ledger, an extract of all journal postings on a federal holiday needs to be obtained. Approach – using the “holiday” command, extract a list of all journal entries posted on holidays. The date format being used is month – day – year (mdy). Audit Command values Column value – [journal posting date] Text Box – mdy Where – (empty) Results A list of any journal entry transactions which have been posted on a date which is a federal holiday. In addition, a summary chart of holiday transactions is prepared. Usage Example 2 Determine if any receiving reports exist for dates falling on a federal holiday. Date format is mdy. Approach – using the “holiday” command, extract a list of receiving transactions falling on a federal holiday. Audit Command values Column value – [receiving report date] Text Box – mdy Where – (empty) Results Auditing data on Excel worksheets Page 44
  • 74. Audit Commands A list of any receiving report transactions which occurred on a federal holiday. In addition, a summary chart of holiday transactions is prepared. 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. Output results Holiday Summary Output results (pasted into Excel work sheet) Holidays: New Year's 14 Martin Luther King 13 President's Day 19 Memorial Day 14 Independence Day 9 Labor Day 8 Columbus Day 7 Veterans Day 8 Thanksgiving 9 Christmas 16 Output results Auditing data in Excel Page 45 worksheets
  • 75. Audit Commands Auditing data on Excel worksheets Page 46
  • 76. Audit Commands Holiday Summary Output results (chart) The chart below was specified using a custom color scheme and the title shown. These values are provided using the “Chart” tab on the processing form. Output results - chart Auditing data in Excel Page 47 worksheets
  • 77. Audit Commands 4.2.4 Ageing Ageing 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: 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” The name of the column with the amount to be aged, e.g. “Balance Due” Usage Example 1 In a test of accounts receivable, an ageing of customer account balances is needed. Approach – using the “age” command, prepare an ageing report for customers in ABC region. Ageing is to be done as of June 30, 2008. Ageing width is 30 days. Audit Command values Column value – [invoice date] Text Box – invoice date, invoice amount, 6/30/2008, mdy Where – region = ‘ABC’ Results An ageing report is prepared for those customer in region ABC as of June 30, 2008. Usage Example 2 In a test of accounts payable, an ageing of vendor invoices is needed. Approach – using the “age” command, prepare an ageing report for vendor invoices. Ageing is to be done as of September 30, 2007. Ageing width is 30 days. Audit Command values Column value – [invoice date] Text Box – invoice date, invoice amount, 6/30/2007, mdy Where – (empty) Results An ageing report is prepared for vendor invoices as of September 30, 2007. Auditing data on Excel worksheets Page 48
  • 78. Audit Commands Output results Ageing Auditing data in Excel Page 49 worksheets
  • 79. Audit Commands Output results (pasted into Excel work sheet) Ageing Report as of 6/30/2005 Start End Amount 5/31/2005 6/29/2005 653,891.00 6/30/2005 7/29/2005 664,956.00 7/30/2005 8/28/2005 681,971.00 8/29/2005 9/27/2005 579,429.00 9/28/2005 10/27/2005 602,309.00 10/28/2005 11/26/2005 671,547.00 11/27/2005 12/26/2005 669,969.00 12/27/2005 1/25/2006 85,773.00 Totals 4,609,845.00 Output results Auditing data on Excel worksheets Page 50
  • 80. Audit Commands Ageing Output results (chart) The chart below was specified using a custom color scheme and the title shown. These values are provided using the “Chart” tab on the processing form. Output results - chart Auditing data in Excel Page 51 worksheets
  • 81. Audit Commands 4.2.5 Date Near Date Near 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) Usage Example 1 For cutoff testing, the auditor wants to identify any sales made within 5 days of June 30, 2008. Approach – using the “datenear” command, prepare a list of any such transactions. Audit Command values Column value – [sales date] Text Box – 6/30/2008, 5 Where – (empty) Results A list of any sales transactions within five days of June 30, 2008, i.e. June 25, 2008 – July 5, 2008. Usage Example 2 For accrual testing, the auditor wants to identify any accruals posted within 15 days of June 30, 2008. Only account numbers beginning with either a ‘2’ or a ‘3’ are to be selected. Approach – using the “datenear” command, prepare a list of any such transactions. Audit Command values Column value – [journal date] Text Box – 6/30/2008, 15 Where – [account number] like ‘[2-3]%’ Results A list of any accruals posted within 15 days for the account numbers specified. Auditing data on Excel worksheets Page 52
  • 82. Audit Commands Note: The default values: US and mdy will be used if nothing is specified. The target date value, and The maximum number of days before or after this date Output results Date near Output results (pasted into Excel work sheet – doesn’t show all rows or columns) TagNo Cost AD Replace Bookval Salvage Depr Life Location Acquisition Accode 840 6032 2421.711 1810 3610.29 1206 484.3423 3 DEF 7/31/2006 6:57 A 4615 6166 2526.535 1850 3639.46 1233 505.307 8 ABC 8/2/2006 11:02 A 2145 6094 2475.97 1828 3618.03 1219 495.194 4 DFS 7/26/2006 0:43 A 1298 6144 2512.487 1843 3631.51 1229 502.4973 3 ABC 7/29/2006 12:14 A 108 6042 2430.326 1813 3611.67 1208 486.0651 8 ABC 7/30/2006 16:04 A 4426 6105 2475.607 1832 3629.39 1221 495.1214 7 ABC 8/4/2006 9:21 I Output results Auditing data in Excel Page 53 worksheets
  • 83. Audit Commands 4.2.6 Date Range Date Range The date range test is the same as “date near”, except specific dates are provided. Usage Example 1 For cutoff testing, the auditor wants to identify any sales made between 6/25/2008 and 7/5/2008. Approach – using the “daterange” command, prepare a list of any such transactions. Audit Command values Column value – [sales date] Text Box – 6/25/2008, 7/5/2008 Where – (empty) Results A list of any sales transactions within the specified range, i.e. June 25, 2008 – July 5, 2008. Usage Example 2 For accrual testing, the auditor wants to identify any accruals posted within 15 days of June 30, 2008. Only account numbers beginning with either a ‘2’ or a ‘3’ are to be selected. Approach – using the “daterange” command, prepare a list of any such transactions. Audit Command values Column value – [journal date] Text Box – 6/15/2008, 7/14/2008 Where – [account number] like ‘[2-3]%’ Results A list of any accruals posted within 15 days for the account numbers specified. Auditing data on Excel worksheets Page 54
  • 84. Audit Commands Output results Date range Output results (pasted into Excel work sheet – doesn’t include all columns) Acquisition TagNo Cost AD Replace Bookval Salvage Depr 7/31/2006 6:57 840 6032 2421.711 1810 3610.29 1206 484.3423 8/11/2006 21:07 4919 6103 2466.12 1831 3636.88 1221 493.224 8/2/2006 11:02 4615 6166 2526.535 1850 3639.46 1233 505.307 8/10/2006 5:16 4376 6040 2417.777 1812 3622.22 1208 483.5554 8/8/2006 3:50 2149 6073 2445.843 1822 3627.16 1215 489.1685 8/4/2006 9:21 4426 6105 2475.607 1832 3629.39 1221 495.1214 8/11/2006 21:21 7053 6158 2510.114 1847 3647.89 1232 502.0229 8/10/2006 9:50 9235 6113 2475.591 1834 3637.41 1223 495.1182 Output results Auditing data in Excel Page 55 worksheets
  • 85. Audit Commands 4.2.7 Week days Report Week days report 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. Usage Example 1 In an audit of expense reports, the counts of expenses by day of week are needed. Approach – using the “wdreport” command, summarize such transactions. Audit Command values Column value – [expense report date] Text Box – mdy Where – (empty) Results A summary of counts of expense report transactions by day of week. Usage Example 2 In an audit of purchasing, the counts of purchase orders issued by day of week are needed. Approach – using the “wdreport” command, summarize such transactions. Audit Command values Column value – [purchase order date] Text Box – mdy Where – (empty) Results A summary of counts of purchase order transactions by day of week. 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. Auditing data on Excel worksheets Page 56
  • 86. Audit Commands Output results Week days report Output results (pasted into Excel work sheet) Weekday analysis: Sunday: 539 Monday: 575 Tuesday: 514 Wednesday: 588 Thursday: 551 Friday: 583 Saturday: 536 Output results Auditing data in Excel Page 57 worksheets
  • 87. Audit Commands Weekdays report Output results (chart) The chart below was specified using a custom color scheme and the title shown. These values are provided using the “Chart” tab on the processing form. The chart indicates that the most common day of the week for the transactions selected was Wednesday and the least frequent day of the week was Tuesday. Output results - chart Auditing data on Excel worksheets Page 58
  • 88. Audit Commands 4.3 Other 4.3.1 Gaps in Sequences Numeric Sequence Gaps A 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. Usage Example 1 A check is to be made to determine if all asset tag numbers are accounted for. The purpose of the test id to determine if there are any “gaps” in the numbers assigned for fixed asset tags. No records are to be excluded. The name of the column for the fixed asset tag number is “Tagno”. The command box to perform this test would be as shown below. Usage Example 2 Auditing data in Excel Page 59 worksheets
  • 89. Audit Commands In an audit of cash, the auditor wishes to determine of the schedule of checks paid is complete, i.e. are there any missing check numbers which have not been accounted for? The commands to perform this test are shown below. Notre that the name of the column which contains the check numbers is called “Check Number”. All of the data is to be tested, i.e. there are no exclusions for testing, so the “Where” box is blank. This command does not require any other information, so that box is also blank. Output results Numeric Sequence Gaps Auditing data on Excel worksheets Page 60
  • 90. Audit Commands Output results (pasted into Excel work sheet – not all of the report is shown) Gaps: Count: 2217 Missing: 6642 3 6 2 9 14 4 15 18 2 19 22 2 22 25 2 25 29 3 29 32 2 33 35 1 35 37 1 37 42 4 43 47 3 49 51 1 52 56 3 56 59 2 59 62 2 62 64 1 64 66 1 66 70 3 70 73 2 This report indicates that for the sequence tested, there were 2,217 gaps which consisted on 6,642 instances of missing numbers. Output results Auditing data in Excel Page 61 worksheets
  • 91. Audit Commands 4.3.2 Data Extraction Data extraction is a very common audit procedure whose purpose is to narrow down the transactions or other data which needs to be tested. Only two pieces of information are required – the name of the command which is selected from the drop down list (“Data extraction”) and the specific instructions which are contained in the “Other Info” column. There are many available commands for performing data extraction and they are described in more detail in Chapter 7. In the first example, the audit wishes to extract fixed asset records for those assets which were acquired during the fiscal year ended June 30, 2008, i.e. July 1, 2997 – June 30, 2008. The name of the column for the acquisition date is named “acquisition date”. Example 1 Note that because the column name contains an embedded space, it must be enclosed in brackets. Auditing data on Excel worksheets Page 62
  • 92. Audit Commands Usage Example 2 In the second example, the auditor wishes to test for a possible error condition. Few assets with a useful life of more than 10 years would have a cost of less than $1,000. The auditor wishes to run an extract to see if there are any such records. In some cases, the syntax needed for the command may not be obvious. There is a “help” facility available by clicking on the label named “Where?”. This brings up a form of examples, where a command similar to that needed may be selected and edited. Example output Output will be just those rows (if any) which meet the criteria specified. At a minimum a header row will be provided. Data Extraction Auditing data in Excel Page 63 worksheets
  • 93. Audit Commands Output results Auditing data on Excel worksheets Page 64
  • 94. Audit Commands Data Extraction Output results (pasted into Excel work sheet – not all is shown) This is a schedule of all assets which have been over depreciated, i.e. cost less accumulated depreciation exceeds salvage. Output results Auditing data in Excel Page 65 worksheets
  • 95. Audit Commands 4.3.3 Duplicates Duplicates 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. Usage Example 1 The first example is a test performed as part of an accounts payable audit. A potential duplicate invoice is defined as one which has the same vendor number, invoice number and invoice date. The test is performed using the commands shown below. The command text in the “Other info” is simply the column names separated by commas: Results A schedule of potential duplicate invoices, using the specification provided. Usage Example 2 Auditing data on Excel worksheets Page 66
  • 96. Audit Commands In an audit of fixed assets, an audit objective is to determine the accuracy of the records by checking for duplicate asset tag numbers. Tag numbers should be unique within any single location. However, there are certain “generic” tag numbers which begin with the letter “A” and these tag numbers should not be tested. The test is performed using the commands shown below. The command text in the “Other info” is simply the column names separated by commas: Output results Duplicates Auditing data in Excel Page 67 worksheets
  • 97. Audit Commands Output results (pasted into Excel work sheet – not all rows and columns are shown, highlighting added for emphasis) location tagno Cost AD Replace Bookval Salvage Depr ABC 19 5766 2357.063 1730 3408.94 1153 471.4125 ABC 19 2575 1042.965 772 1532.03 515 208.5931 ABC 56 3888 1568.307 1166 2319.69 778 313.6614 ABC 56 7557 3036.653 2267 4520.35 1511 607.3306 ABC 110 2735 1102.043 820 1632.96 547 220.4085 ABC 110 5214 2101.48 1564 3112.52 1043 420.2959 ABC 122 8814 3527.223 2644 5286.78 1763 705.4446 ABC 122 2040 826.3205 612 1213.68 408 165.2641 ABC 139 7391 2966.962 2217 4424.04 1478 593.3925 ABC 139 2425 978.3281 728 1446.67 485 195.6656 ABC 233 8410 3424.003 2523 4986 1682 684.8005 ABC 233 4463 3570 1339 893 893 357.7068 ABC 258 2704 1098.159 811 1605.84 541 219.6318 ABC 258 8965 3620.646 2690 5344.35 1793 724.1293 ABC 402 6213 2531.266 1864 3681.73 1243 506.2532 ABC 402 4365 1771.483 1310 2593.52 873 354.2965 ABC 418 2952 1187.545 886 1764.46 590 237.5089 ABC 418 6729 2728.152 2019 4000.85 1346 545.6304 ABC 441 7380 3014.342 2214 4365.66 1476 602.8683 ABC 441 7263 2970.587 2179 4292.41 1453 594.1173 ABC 520 6359 2567.103 1908 3791.9 1272 513.4206 ABC 520 8120 3297.159 2436 4822.84 1624 659.4317 ABC 556 1198 486.1772 359 711.82 240 97.23544 ABC 556 3849 1576.375 1155 2272.63 770 315.2749 ABC 560 3209 1287.226 963 1921.77 642 257.4452 Output results Auditing data on Excel worksheets Page 68
  • 98. Audit Commands 4.3.4 Same, Same, Different Same, Same, Different 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. The test is performed using the names of the columns to be tested. 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). Usage Example 1 In an audit of accounts payable, test for the unusual situation described above. Approach – using the “ssd” command, analyze the transactions. Audit Command values Column value – [blank] Text Box – [Vendor Number],[Invoice Number],[Invoice date],[Invoice Amount] Where – (empty) Results A schedule of any transaction pairs which have the same vendor number, invoice number, invoice date, but a different invoice amount. Usage Example 2 In an audit of payroll transactions, check for any pair of records which have the same employee last Auditing data in Excel Page 69 worksheets
  • 99. Audit Commands name, same employee first name, same street address, but different employee numbers. Tests are to be made only for those employees in Florida, Georgia and Alabama. Approach – using the “ssd” command, analyze such transactions. Audit Command values Column value – [empty] Text Box – [last name],[first name], [street address], [employee number] Where –state in (‘FL’,’GA’,”AL’) Results Schedule of any such records identified. The example below illustrates the procedure for identifying instances of fixed asset records which have the same tag number but a different location. Output results Same, Same, Different Auditing data on Excel worksheets Page 70
  • 100. Audit Commands Output results (pasted into Excel work sheet – emphasis added, not all rows and columns shown) location tagno cost AD Replace Bookval Salvage Depr ABC 19 2575 1042.965 772 1532.03 515 208.5931 ABC 19 5766 2357.063 1730 3408.94 1153 471.4125 ABC 56 3888 1568.307 1166 2319.69 778 313.6614 ABC 56 7557 3036.653 2267 4520.35 1511 607.3306 ABC 110 2735 1102.043 820 1632.96 547 220.4085 ABC 110 5214 2101.48 1564 3112.52 1043 420.2959 ABC 122 2040 826.3205 612 1213.68 408 165.2641 ABC 122 8814 3527.223 2644 5286.78 1763 705.4446 ABC 139 2425 978.3281 728 1446.67 485 195.6656 ABC 139 7391 2966.962 2217 4424.04 1478 593.3925 ABC 233 4463 3570 1339 893 893 357.7068 ABC 233 8410 3424.003 2523 4986 1682 684.8005 ABC 258 2704 1098.159 811 1605.84 541 219.6318 ABC 258 8965 3620.646 2690 5344.35 1793 724.1293 ABC 402 4365 1771.483 1310 2593.52 873 354.2965 ABC 402 6213 2531.266 1864 3681.73 1243 506.2532 ABC 418 2952 1187.545 886 1764.46 590 237.5089 ABC 418 6729 2728.152 2019 4000.85 1346 545.6304 ABC 441 7263 2970.587 2179 4292.41 1453 594.1173 ABC 441 7380 3014.342 2214 4365.66 1476 602.8683 ABC 520 6359 2567.103 1908 3791.9 1272 513.4206 ABC 520 8120 3297.159 2436 4822.84 1624 659.4317 ABC 556 1198 486.1772 359 711.82 240 97.23544 ABC 556 3849 1576.375 1155 2272.63 770 315.2749 ABC 560 3209 1287.226 963 1921.77 642 257.4452 This schedule shows those assets which have the same location and tag number, but a different cost amount. Output results Auditing data in Excel Page 71 worksheets
  • 101. Audit Commands 4.3.5 Trend Lines The system provides for four primary types of trend line analysis: Briefly, the tests perform the following procedures: Menu name for test Description Regression Best Fit Performs a basic “best fit” linear regression and reports the results as text file. Uses a single column of data for the regression. Trend Line Most flexible type of regression analysis, as it can summarize or aggregate data prior to plotting. Handles various periods, as well as various summarization functions. Confidence Band (summarize Expects time line data, with a column for year, column for data) month, X-axis amount, Y-axis amount Confidence Band Expects an identifier, an X-value and a Y-value Regression best fit Trend lines Auditing data on Excel worksheets Page 72
  • 102. Audit Commands The purpose of the trend line procedure is to perform a “best fit” 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. Usage Example 1 Comparative income statements exists for the last five years. In this test, a trend analysis on the Sales amounts will be performed. (The amounts shown are actual from a Standard and Poors report for a Fortune 500 company. Since the data is in horizontal format, the check box “Rows” is checked before the data is copied from Excel and pasted into the form. Auditing data in Excel Page 73 worksheets
  • 103. Audit Commands Output results Trend Line Output results show the basic trend line information – intercept, slope and correlation coefficient. The slope is negative because the information goes back in time. The correlation of 83% indicates a fairly consistent trend over time. Output results Auditing data on Excel worksheets Page 74
  • 104. Audit Commands 4.3.6 Time Line analysis Time line analysis The purpose of the timeline analysis command is summarize and chart key information from transaction data over a time period in order to see underlying trends or to identify potential anomalies or errors. Built into the functionality is the ability to “drill down” using various criteria and also to view the summarized information using various measures such as counts, totals, averages, etc. Output is a detail report which identifies potential variances, as well as a chart so that the summarized information may be more easily viewed. To run the analysis, five pieces of information are needed: 1. Name of the date column to be used, i.e. the name of the column which contains the transaction date to be used for the analysis. 2. Name of the amount column, i.e. the column containing the numeric information being analyzed 3. The time interval to be used for the analysis, specified as a single letter, and which must be one of the following: a. monthly, specified using ‘m’ b. quarterly, specified using ‘q’ c. annually, specified using ‘y’ d. weekly, specified using ‘w’ e. daily, specified using ‘d’ 4. The type of metric to be applied, which must be one of the following: a. summary, specified as ‘sum’, b. count, specified as ‘count’ c. average, specified as ‘avg’, d. minimum value, specified as ‘min’ e. maximum value, specified as ‘max’, f. standard deviation, specified as ‘stdev’ 5. The confidence level, a number between 0 and 1. The default value is .95, i.e. a 95% confidence level With this information, the system will aggregate the data using the time period specified and the type of aggregation desired. The results will be written out as a text file and also plotted on a chart. Auditing data in Excel Page 75 worksheets
  • 105. Audit Commands Usage Example 1 In an audit of accounts payable, the auditor wishes to see a trend as to invoice totals for a specified vendor, by quarter, in order to view the overall trend and to see if there may be any unusual items such as “spikes”, missing data, etc. The date column to be used is called “invoice date”, and the amount column to be analyzed is called “invoice amount”. Tests are to be done at a 95% confidence level. The command would be as follows: [invoice date], [invoice amount], q, sum, .95 Usage Example 2 Continuing with the same example, the auditor now wants to see transaction counts by month. The command would then be as follows: [invoice date], [invoice amount], m, count, .95 The command box above performs a time line analysis of asset acquisitions using the “cost” column, and specifying a period of “q” (quarterly) with a precision of 95%. The chart produced is shown below. Auditing data on Excel worksheets Page 76
  • 106. Audit Commands The chart indicates that there were few or no asset acquisitions prior to the first quarter of 2004. To get a more representative picture, the procedure can be re-run, specifying just asset acquisitions made after January 1, 2004. Running this procedure produces the following chart: Auditing data in Excel Page 77 worksheets
  • 107. Audit Commands Output results Time line analysis Auditing data on Excel worksheets Page 78
  • 108. Audit Commands A chart is produced which shows the invoices totaled by quarter and plotted as a trend line. There is also a text report which has all the details. Below is that data imported into Excel. Output results Auditing data in Excel Page 79 worksheets
  • 109. Audit Commands Linear regression report: Equation: y = b + mx Intercept: 1,749,261.72 Slope:21,191.67 Correlation: 1% Precision: 0.95 Lower Lower Upper Upper Desc X Y Predicted Prediction Confidence Predicted Confidence Prediction 2002-01 1 237,272 1,770,453 1,770,447 1,770,449 1,770,453 1,770,458 1,770,460 2002-02 2 1,788,596 1,791,645 1,791,639 1,791,641 1,791,645 1,791,649 1,791,651 2002-03 3 2,742,676 1,812,837 1,812,831 1,812,833 1,812,837 1,812,840 1,812,842 2002-04 4 4,232,764 1,834,028 1,834,023 1,834,026 1,834,028 1,834,031 1,834,034 2003-01 5 736,504 1,855,220 1,855,215 1,855,218 1,855,220 1,855,222 1,855,225 2003-02 6 1,547,613 1,876,412 1,876,407 1,876,410 1,876,412 1,876,413 1,876,417 2003-03 7 1,840,285 1,897,603 1,897,599 1,897,602 1,897,603 1,897,605 1,897,608 2003-04 8 3,446,882 1,918,795 1,918,790 1,918,794 1,918,795 1,918,796 1,918,800 2004-01 9 343,401 1,939,987 1,939,982 1,939,985 1,939,987 1,939,988 1,939,991 2004-02 10 1,631,899 1,961,178 1,961,174 1,961,177 1,961,178 1,961,180 1,961,183 2004-03 11 1,345,257 1,982,370 1,982,365 1,982,368 1,982,370 1,982,372 1,982,375 2004-04 12 3,621,404 2,003,562 2,003,556 2,003,559 2,003,562 2,003,565 2,003,567 2005-01 13 376,953 2,024,753 2,024,748 2,024,750 2,024,753 2,024,757 2,024,759 2005-02 14 2,130,685 2,045,945 2,045,939 2,045,941 2,045,945 2,045,949 2,045,951 2005-03 15 2,759,735 2,067,137 2,067,130 2,067,132 2,067,137 2,067,141 2,067,143 Queries can now be further refined. The next query obtains the same information by month, changing only the period parameter from a ‘q’ to an ‘m’. The results showing monthly amounts are below: Auditing data on Excel worksheets Page 80
  • 110. Audit Commands Auditing data in Excel Page 81 worksheets
  • 111. Audit Commands 4.3.7 Confidence Band Confidence Band 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. Usage Example 1 In an audit of transportation expenses, there is a need to determine if there is a linear relationship between mileage and annual maintenance expenses Approach – using the “confband” command, test such a relationship. Audit Command values Column value –N/A Text Box – county, mileage, expense, 90 Where – (empty) Results A trend line chart with confidence and prediction intervals for the linear relationship. The results are shown below. Auditing data on Excel worksheets Page 82
  • 112. Audit Commands The chart shows that there is a fair overall correlation between the data. (86.3%). However, for one data point the repair costs are well outside the expected range. This might be an area the auditor could focus on. Output results Confidence Band Auditing data in Excel Page 83 worksheets
  • 113. Audit Commands Output results (pasted into Excel work sheet – emphasis added, formatting performed for clarity) Linear regression report: Equation: y = b + mx Intercept: 5505.15584475063 Slope:6.61707235425678E-02 Correlation: 35% Precision: 0.9 Desc X Y Predicted Lower PredictionConfidence Lower Predicted Upper Confidence Upper Prediction Comment Wake 19,758.00 6,737.81 6,812.56 -1,028.65 -1,027.45 6,812.56 14,652.56 14,653.76 Mecklenberg 14,097.00 6,248.66 6,437.96 3,231.92 3,234.85 6,437.96 9,641.08 9,644.01 New Hanover 12,518.00 6,180.84 6,333.48 4,418.72 4,423.63 6,333.48 8,243.33 8,248.24 Johnston 12,121.00 6,231.25 6,307.21 4,716.58 4,722.49 6,307.21 7,891.93 7,897.84 Person 11,838.00 6,208.12 6,288.48 4,928.60 4,935.52 6,288.48 7,641.45 7,648.37 observed greater than upper predictionobserved greater than upper Dansbury 7,957.00 8,213.17 6,031.68 4,199.87 4,205.00 6,031.68 7,858.35 7,863.48 confidence Smythe 18,731.00 6,623.40 6,744.60 -255.53 -254.19 6,744.60 13,743.39 13,744.73 Jackson 2,465.00 5,488.28 5,668.27 -658.25 -656.76 5,668.27 11,993.30 11,994.78 Gregory 14,380.00 6,323.13 6,456.69 3,019.05 3,021.78 6,456.69 9,891.60 9,894.33 Altenberg 13,612.00 6,330.88 6,405.87 3,596.66 3,600.00 6,405.87 9,211.74 9,215.08 Jamestown 16,769.00 6,691.96 6,614.77 1,221.32 1,223.06 6,614.77 12,006.49 12,008.23 Flurry 1,880.00 5,430.37 5,629.56 -1,176.03 -1,174.65 5,629.56 12,433.76 12,435.14 Snow 15,366.00 6,443.21 6,521.94 2,277.20 2,279.41 6,521.94 10,764.46 10,766.67 Bear 790.00 5,307.48 5,557.43 -2,140.82 -2,139.60 5,557.43 13,254.46 13,255.68 Rugged 3,488.00 5,615.62 5,735.96 247.16 248.87 5,735.96 11,223.05 11,224.76 PineLake 4,154.00 5,691.17 5,780.03 836.55 838.45 5,780.03 10,721.60 10,723.50 FireStorm 3,083.00 5,427.82 5,709.16 -111.28 -109.67 5,709.16 11,527.99 11,529.60 observed less than Fern Valley 10,354.00 6,032.78 6,190.29 5,993.84 6,049.51 6,190.29 6,331.06 6,386.73 lower confidence Output results Auditing data on Excel worksheets Page 84
  • 114. Audit Commands 4.3.8 Confidence Band (Time Series) Confidence Band (Time Series) The purpose of the confidence band (time series) 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. Usage Example 1 In an audit of transportation expenses, there is a need to determine if there is a linear relationship between mileage and annual maintenance expenses Approach – using the “confband2” command, test such a relationship. Audit Command values Column value –N/A Text Box – year, month, x, y Where – (empty) Results A trend line chart over time with confidence and prediction intervals for the linear relationship. Auditing data in Excel Page 85 worksheets
  • 115. Audit Commands Output results Confidence Band Auditing data on Excel worksheets Page 86
  • 116. Audit Commands Output results (pasted into Excel work sheet) Linear regression report: Equation: y = b + mx Intercept: -98,566,325.03 Slope:.75 Correlation: 92% Precision: 0.95 Desc X Y Predicted Lower Prediction Lower Confidence 2006 612,431,244 366,090,524 362,095,393 362,075,542 362,081,464 2006 613,830,062 367,229,455 363,147,564 363,127,884 363,133,880 2006 612,620,399 365,915,304 362,237,673 362,217,845 362,223,777 2006 618,495,141 369,547,857 366,656,567 366,637,446 366,643,700 2006 627,127,285 374,879,234 373,149,538 373,131,398 373,138,180 2006 633,270,865 378,741,151 377,770,648 377,753,157 377,760,358 2007 632,794,709 378,369,860 377,412,490 377,394,950 377,402,118 2007 642,889,555 384,330,410 385,005,684 384,989,116 384,997,055 2007 644,463,504 385,499,489 386,189,586 386,173,156 386,181,226 2007 647,205,315 386,752,684 388,251,935 388,235,738 388,244,043 2007 653,761,539 390,778,601 393,183,429 393,167,743 393,176,647 2007 652,110,029 390,005,684 391,941,188 391,925,380 391,934,128 2007 660,198,698 394,903,316 398,025,366 398,010,110 398,019,649 2007 664,973,395 397,501,158 401,616,822 401,601,837 401,611,873 2007 668,487,813 399,771,977 404,260,315 404,245,502 404,255,913 2007 668,513,159 399,672,729 404,279,380 404,264,568 404,274,982 2007 678,544,943 405,511,744 411,825,140 411,810,679 411,822,128 2007 681,055,251 407,453,084 413,713,356 413,698,949 413,710,617 2008 684,321,972 409,175,851 416,170,535 416,156,179 416,168,076 2008 686,935,005 410,469,415 418,136,020 418,121,687 418,133,702 2008 693,665,939 414,624,926 423,198,929 423,184,588 423,196,558 2008 695,128,158 415,499,082 424,298,789 424,284,432 424,296,327 2008 698,103,060 417,103,640 426,536,466 426,522,064 426,533,753 2008 704,591,803 421,191,848 431,417,202 431,402,636 431,413,719 Output results Auditing data in Excel Page 87 worksheets
  • 117. Audit Commands Confidence Band Output results (chart) The chart below was specified using a custom color scheme and the title shown. These values are provided using the “Chart” tab on the processing form. The chart indicates that there is a good correlation (98.7%) between the claim amount and the ffp amount. The correlation should be 100%. Further checking is needed at the account level. Output results - chart Auditing data on Excel worksheets Page 88
  • 118. Audit Commands 4.3.9 Invoice Near Miss Invoice “Near Miss” Invoice Near Miss Duplicate invoices may arise due to a variety of circumstances, even when system edits are in place. One example is where two invoices from the same vendor for the same amount are entered, where one invoice number is a slight variation of the other, e.g. a transposition. In cases like this, the system may not necessarily recognize that the invoices are duplicates. The purpose of the near miss procedure is to identify potential duplicate invoices by checking for any combination of two invoices which meet the following criteria: same vendor number difference in invoice amounts is $.02 or less date difference is less than amount specified difference in invoice numbers (as measured by Levenshtein distance) is less than the number spe- cified An example will illustrate: First invoice - vendor 123, amount $100.00, date 8/18/2009, invoice number 10023 Second invoice - vendor 123, amount $100.00, date 9/5/2003, invoice number 10032 If the specification for the identification of duplicates were 30 days and a Levenshtein distance of 2, these two invoices would be flagged as potential duplicates. For this test, the input data does not need to be sorted. However, the comparison process is com- putationally intensive, so that invoices from any one vendor are tested in blocks of up to 200 in count. Generally, the system will identify potentially duplicate invoices based upon the criteria provided, but it is possible that for vendors with a large number of invoices, two potentially duplicate invoices could be missed. Auditing data in Excel Page 89 worksheets
  • 119. Audit Commands Output results Invoice “Near Miss” Output results (pasted into Excel work sheet) Near Miss Report Vendno Amt Inv Date Second Date Invno Suspect Invno Closeness V200 103.02 5/31/2007 5/31/2007 2103 4 V200 103.02 6/2/2007 5/31/2007 2103 4 V200 103.02 6/2/2007 5/31/2007 0 V201 186.01 5/26/2007 5/26/2007 2186 2186 0 V202 647.82 4/29/2007 4/29/2007 20647 2647 1 V202 647.82 4/29/2007 4/29/2007 2467 2647 2 V202 647.82 4/29/2007 4/29/2007 2467 20647 2 V202 647.82 4/29/2007 4/29/2007 2647 2647 0 V202 647.82 4/29/2007 4/29/2007 2647 20647 1 V202 647.82 4/29/2007 4/29/2007 2647 2467 2 Auditing data on Excel worksheets Page 90
  • 120. Audit Commands Output results Auditing data in Excel Page 91 worksheets
  • 121. Audit Commands 4.3.10 Split Invoices Split invoices 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. 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. Usage Example 1 A test of invoices is made to determine if any potential “split invoice” payments can be identified. The names of the column values to be tested are as follows: Column name Description Vendor Vendor number InvNo Invoice Number InvDate Invoice Date InvAmt Invoice Amount Tests are to be made for invoices with dates up to 30 days apart. The values entered into the form are shown below. Auditing data on Excel worksheets Page 92
  • 122. Audit Commands Output results Split invoices Output results (pasted into Excel work sheet) Split Invoice Report Vendno Inv No Inv No2 Amount Amount2 Amount 3 Diff V201 2186 2186 86.01 186.01 100 2 30 V201 2186 2186 100 186.01 86.01 2 30 These results indicate that there was an invoice paid in the amount of $186.01. In addition, two other invoices to the same vendor, within the specified time period were paid which also totaled to $186.01 = $100.00 + $86.01. Output results Auditing data in Excel Page 93 worksheets
  • 123. Audit Commands 4.3.11 Check SSN Validity of Social Security Numbers 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. Usage Example 1 A test of validity of social security numbers is to be performed on data where the social security number column is named “SSN”. Audit Command values Column value – [SSN] Text Box – (empty) Where – (empty) Results A list of all records where the social security number is invalid. The input form used to perform the checking is shown below. Auditing data on Excel worksheets Page 94
  • 124. Audit Commands Output results Validity of Social Security Numbers Auditing data in Excel Page 95 worksheets
  • 125. Audit Commands Output results (pasted into Excel work sheet- not all rows shown – no social security numbers shown are valid – highlight added for emphasis) SSN LASTNAME FIRSTNAME MIDNAME DOB ADDRESS CITY NOT A REAL SOCIAL SECURITY NUMBER BLACKBURN BLAKE 1/15/1930 P O BOX 196 AGURA HILLS NOT A REAL SOCIAL SECURITY NUMBER NYMAN WOODROW A 1/24/1930 10013 S RHODES MONMOUTH JUNCTION NOT A REAL SOCIAL SECURITY NUMBER MCMULLAN CLAYBORN 1/29/1930 931 E HOPE ST WESTPORT NOT A REAL SOCIAL SECURITY NUMBER WEINREB DEBBIE 5/12/1930 818 KIRKWOOD ST HOLLIS NOT A REAL SOCIAL SECURITY NUMBER DIAZ CHARLENE 5/18/1930 C/O 3420 NE 168TH ST PELHAM NOT A REAL SOCIAL SECURITY NUMBER NANCE YVONNE A 8/15/1930 10 RAINBOW LANE HILLS GRANADA NOT A REAL SOCIAL SECURITY NUMBER RUSSELL MELISSA JAMES 8/30/1930 237 MASTEN RD EGGERTSVILLE NOT A REAL SOCIAL SECURITY NUMBER BARBOUR ANTHONY 10/22/1930 P O BOX 630, #79729-004 ROCKVILLE CTR NOT A REAL SOCIAL SECURITY NUMBER STONER JO MIGUEL 4/17/1931 4595 HYLAND BLVD COLEMAN NOT A REAL SOCIAL SECURITY NUMBER PEPIN LINDA L 6/30/1931 311 BRIDGE ST DECATUR NOT A REAL SOCIAL SECURITY NUMBER MCNAMARA TIMOTHY ALICE 12/30/1931 11120 NW GAINESVILLE ROAD LOS ALTOS NOT A REAL SOCIAL SECURITY NUMBER CASTRO LOUIS L 1/22/1932 300 MAIN STREET ROCHESTER NOT A REAL SOCIAL SECURITY NUMBER CAPLES ANGELA 1/25/1932 P O BOX 8103 READING NOT A REAL SOCIAL SECURITY NUMBER SCHWANDT LOUIS L 1/30/1932 3000 MURWORTH DR, APT 511 SPOKANE NOT A REAL SOCIAL SECURITY NUMBER FISHKIN AVANELL 4/23/1932 P O BOX 496 MIAMI NOT A REAL SOCIAL SECURITY NUMBER MOORE LEROY LANG 7/1/1932 3201 KNIGHT ST, APT 1402 KENNER NOT A REAL SOCIAL SECURITY NUMBER BAJZA MEGAN JEAN 7/9/1933 241 FARNOL ST, SW PRESCOTT NOT A REAL SOCIAL SECURITY NUMBER BROWN BRIDGETTE 8/2/1933 P O BOX 1032, #79399-004 CAMP VERDE NOT A REAL SOCIAL SECURITY NUMBER WHITE MARK K 9/7/1933 269 EAST S STREET GROVE DOWNERS NOT A REAL SOCIAL SECURITY NUMBER BUTCHER HARRIET S 3/13/1934 5771 DEXTER CIRCLE KNOXVILLE NOT A REAL SOCIAL SECURITY NUMBER VANGRAEFSCHEPE JASON PARAMA 3/26/1934 501 N 13TH AVENUE CHARLESTON Output results Auditing data on Excel worksheets Page 96
  • 126. Audit Commands 4.3.12 Check PO Box Check for Post Office Box 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. In audits of disbursements made based upon an accounts payable system, one of the audit tests commonly performed is to test for vendors whose address is a post office box. Generally, vendors should have a street address where they receive their mail. In certain instances, fraudulent payments have been made to vendors using a post office box in order to disguise the true nature of the payment, which may be associated with an employee of the company making the payment. Although it is possible to visually check for post office boxes in addresses, the process can be tedious and time consuming, especially if a large number of records are involved. One of the challenges is simply the ability to recognize many of the variations possible in the designation of a post office box in an address. For example, the address might be structured in any of the following formats: P.O. Box 123 POB 123 Post office box 123 PO 123 Box 123 pobox 123 Etc. Example 1 Search the column named “Address1” in the vendor master for addresses which might be post office boxes. Auditing data in Excel Page 97 worksheets
  • 127. Audit Commands Output results Check for Post Office Box Auditing data on Excel worksheets Page 98
  • 128. Audit Commands Output results (pasted into Excel work sheet – not all rows and columns shown, highlighting added for emphasis) ADDRESS LASTNAME FIRSTNAME IDNAME DOB M CITY STATE P O BOX 196 BLACKBURN BLAKE 1/15/1930 AGURA HILLS CA P O BOX 630, #79729-004 BARBOUR ANTHONY 10/22/1930 ROCKVILLE CTR NY P O BOX 8103 CAPLES ANGELA 1/25/1932 READING PA P O BOX 496 FISHKIN AVANELL 4/23/1932 MIAMI FL P O BOX 1032, #79399-004 BROWN BRIDGETTE 8/2/1933 CAMP VERDE AZ P O BOX 820, HIGHWAY 44 TELFORD ANGELA 1/14/1934 LITTLE ROCK AR P O BOX 41617 HYATT BARBARA 8/3/1934 GRAND ISLAND NY P O BOX 638 GURUNIAN ANTHONY 1/4/1937 MIAMI FL P O BOX 8119 ARTMAN ANGELA 2/26/1937 MALIBU CA P O BOX 52362 HARDING ARTHUR 9/10/1937 PALM HARBOR FL P O BOX 7 STONE ANNA 1/27/1938 WARREN MI P O BOX 1813 FAULKNER BONNIE 9/22/1938 RINGWOODJN P O BOX 737 CARR ANGELIQUE 9/28/1938 MASSAPEQUA PARK NY POST OFFICE BOX 3007 ANDERSON AMANDA 12/29/1938 FORT VALLEY GA P O BOX 6001, UNIT D FCI MILLS ARMANDO 6/3/1939 CHICAGO IL P O BOX 2796 ROUTON BETH 9/9/1939 SAN JOSE CA P O BOX 2002 LINCK BILL 1/3/1940 SANTA MONICA CA P O BOX 641 BUANNO ANSA 3/31/1940 DAVIDSONVILLE MD P O BOX 312 SCANDY BERNADETTE 10/10/1940 PORT WASHINGTON NY P O BOX 832 JONES ANGELA 4/9/1941 MASPETH NY P O BOX 60189 BARTLETT ARLENE 9/19/1941 MADISON WI Output results Auditing data in Excel Page 99 worksheets
  • 129. Audit Commands 4.3.13 Calculated Values Calculated Values In many instances the auditor wishes to add a column of data, e.g. a calculated amount, based upon values contained in other columns. Calculated values A common procedure used during the analysis of data in Excel is to insert one or more columns and calculate their value using formula which based on values contained in other columns. Although this procedure is effective, it has the drawback that column letters must be used instead of column names which makes interpreting and verifying the formulae used more difficult. The purpose of the calculated values procedure is to add one or more columns to a work sheet us- ing formula with column names. Often the formula will consist of mathematical operations, but any SQL function may be used (see list of functions in description of where clause values). The syntax for the calculated values is "expression1 as name1, expression2 as name2" etc. where "expression" is a calculated value. The word "as" must be used without change, and "name" must be a description beginning with a letter and consisting of only letters, numbers and the special char- acters "$", "_". If the name contains any embedded spaces, then the entire name must be enclosed in brackets, e.g. "[cost amount]". Examples - Add a column called net book value computed as cost less accumulated depreciation Other info - [cost] - [accumulated depreciation] as [net book value] (Note the use of brackets due to embedded spaces in the names) Auditing data on Excel worksheets Page 100
  • 130. Audit Commands Output results Calculated Values Auditing data in Excel Page 101 worksheets
  • 131. Audit Commands Output results (pasted into Excel work sheet – first column highlighted for emphasis) property tax TagNo Cost AD Replace Bookval Salvage Depr Life Location AcqDate 72.49729037 3504 2438 988.0542 731 1449.95 488 197.6108 6 ABC 4/6/2005 97.1394758 4148 3244 1301.21 973 1942.79 649 260.2421 5 ABC 2/3/2006 274.2308104 3302 9163 3678.384 2749 5484.62 1833 735.6768 8 ABC 10/15/2004 146.6431954 3816 4937 2004.136 1481 2932.86 987 400.8272 4 ABC 7/8/2005 240.3376714 3411 8118 3311.247 2435 4806.75 1624 662.2493 5 ABC 2/9/2007 245.5702876 2547 8258 3346.594 2477 4911.41 1652 669.3188 9 ABC 5/26/2007 94.12422075 1701 3143 1260.516 943 1882.48 629 252.1031 11 ABC 9/30/2005 265.6780722 3960 8955 3641.439 2686 5313.56 1791 728.2877 3 ABC 12/8/2005 85.70210075 5056 2885 1170.958 866 1714.04 577 234.1916 5 ABC 3/24/2005 47.82652079 2996 1596 639.4696 479 956.53 319 127.8939 3 ABC 10/7/2005 93.07851995 1299 3115 1253.43 934 1861.57 623 250.6859 12 ABC 3/4/2006 66.92986036 2881 2244 905.4028 673 1338.6 449 181.0806 8 ABC 3/6/2006 30.4 2791 3039 2431 912 608 608 761.4 12 ABC 3/17/2007 155.8641946 1443 5240 2122.716 1572 3117.28 1048 424.5432 12 ABC 11/17/2004 42.23143191 1202 1416 571.3714 425 844.63 283 114.2743 6 ABC 6/5/2007 172.5694554 3567 5776 2324.611 1733 3451.39 1155 464.9222 11 ABC 12/5/2004 79.1798243 5010 2645 1061.404 794 1583.6 529 212.2807 10 ABC 9/28/2006 91.2098218 4163 3048 1223.804 914 1824.2 610 244.7607 4 ABC 12/19/2005 271.3595988 1306 9177 3749.808 2753 5427.19 1835 749.9616 7 ABC 9/17/2006 11.65 5205 1165 932 350 233 233 95.43749 8 ABC 4/8/2006 73.8564635 4219 2500 1022.871 750 1477.13 500 204.5741 3 ABC 7/10/2006 17.93122414 1384 603 244.3755 181 358.62 121 48.8751 12 ABC 1/25/2006 284.3327576 3914 9578 3891.345 2873 5686.66 1916 778.269 4 ABC 8/19/2005 44.18759538 4323 1482 598.2481 445 883.75 296 119.6496 7 ABC 3/16/2007 143.4290984 4758 4829 1960.418 1449 2868.58 966 392.0836 9 ABC 2/3/2006 79.19611735 3213 2669 1085.078 801 1583.92 534 217.0155 11 ABC 5/21/2006 Output results Auditing data on Excel worksheets Page 102
  • 132. Audit Commands 4.3.14 Fuzzy Match (LD) Fuzzy Match (Levenshtein distance) 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". Usage Example 1 Fuzzy Match Levenshtein distance The difference between any two character strings may be measured using the "Levenshtein dis- tance". This concept was developed by the Russian physicist Vladimir Levenshtein and defines the distance as the minimum number of character additions, deletions and changes necessary to trans- form one character string into another. For auditors, the concept is applicable to searches for character strings which represent only very minor differences between two character strings. For example, the name "McMillan" is similar, but not identical to "McMillun". In this case the distance would be one, because only a single change from the letter "a" to the letter "u" is necessary for them to be identical. As another example, trans- positions will represent a Levenshtein distance of 2, as both an insertion and a deletion are required in order for the two strings to be identical. Common uses for the algorithm can be found in searches where an exact match is not found, but two or more instances may be identified which are "close". Such searches might be needed in looking at vendor master files, checking for potentially duplicate invoice numbers or any other situ- ation where two or more instances might be found which are close, but not identical. The test can be performed on either a single column by specifying the column name, or else on all columns (by omitting the column name). If the test is to be done ignoring case, then the command "UCASE" should be specified for the column name, e.g. Ucase(lastname). If leading and trailing spaces are to be ignored the "TRIM" command should be specified, e.g. Trim(address). The search specification is made by providing the text to search against, as well as the maximum distance to be considered. The following are examples of usage: Auditing data in Excel Page 103 worksheets
  • 133. Audit Commands Check for a last name within a distance of 2 from McMillan. column name - lastname other info - McMillan, 2 Same check, but ignore case column name - Ucase(lastname) other info - MCMILLAN, 2 Check for address like 108 Fallsworth, trim any spaces on left and right column name - trim(address) other info - 108 Fallsworth Same check, but ignore case column name - ucase( trim(address)) other info - 108 FALLSWORTH Output results Fuzzy Match (Levenshtein distance) Output results (pasted into Excel work sheet – not all columns shown, highlighting added for emphasis) LASTNAME FIRSTNAME MIDNAME DOB ADDRESS CITY STATE MCMULLAN CLAYBORN 1/29/1930 931 E HOPE ST WESTPORT T C This schedule is the results of a search for a record with a last name of ‘MCMILLAN’ with a Levenshtein distance of 2. In this example, a single character ‘U’ could be replaced with an ‘I’ to obtain the match desired. This was the only instance identified in the search that was within a Levenshtein distance of 2. Output results Auditing data on Excel worksheets Page 104
  • 134. Audit Commands 4.3.15 Fuzzy Match (Regular Expression) Fuzzy Match (regular expression) 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 Usage Example 1 A search is to be made of employee last names where the first letter is “H” and the second letter is any of the characters “E” through “I”. The last name to be matched can contain two or more letters in total. The search specification is shown in the form below. Auditing data in Excel Page 105 worksheets
  • 135. Audit Commands Output results Fuzzy Match (regular expression) Auditing data on Excel worksheets Page 106
  • 136. Audit Commands Output results (pasted into Excel work sheet – not all rows and columns are shown) LASTNAME FIRSTNAME MIDNAME DOB ADDRESS CITY HENRY DARRIN 1/13/1930 844 JEFFERSON ST CLEARWATER HENTHORN PAMELA H 3/25/1936 2070 HIGHWAY NEW GLOUCESTER 30 W HICKS SHIRLEY C 6/20/1936 13317 S W 64 LANE S PADRE ISLAND HILPERT VANESSA A 11/25/1936 1072 FORDHAMSANTA ANA LANE HERNANDEZ BILLIE 2/7/1947 P O BOX 2000, #57621-004 MIAMI HENNEKES DAVID 4/22/1948 830 N FOOTE, APT B CITY YUBA HELMS JOEL MELVIN 7/1/1948 444 W DUARTE SEATTLE RD, #C3 HEADRICK AIDA 3/13/1949 ROUTE 7, BOX 7338 CHICAGO HEGARTY CARLOS 8/30/1950 MORGAN HILL FARM, BOX 62 RUDYARD HENDERSON LINDA L 10/10/1950 315 S 3RD STREET OSHKOSH HENLEY DAVID 3/4/1951 8303 LENNON ROAD WOODLAND HILLS HENRY TOBI ALAN 7/10/1951 111 STERLING DRIVE REDDING HERNANDEZ CHRISTOPH 7/30/1952 95 PALISADE AVENEWINGTON HERING ARTHUR 10/8/1954 P O BOX 589 ALBUQUERQUE HERZOG LUIS L 8/4/1955 3 MAULDIN AVEBARNESBORO HESSER BRENDA 8/11/1955 P O BOX 1439 JUNCOS HENRY MARK K 10/5/1955 269 HANOVER AVE, #202 CULPEPER HINTON RICKY E 5/2/1957 1710 WEINSTOCK ST LAKELAND HENDERSON JOHN MARIE 2/19/1958 4233 SUNLAND WARREN E COURT, S HEATH TERRI ANN 6/17/1958 11614 EAST 18TH STREET CEDAR CREEK Output results Auditing data in Excel Page 107 worksheets
  • 137. Audit Commands 4.3.16 Sequential Invoices Sequential invoices Sequential Invoices Generally vendors do not issue sequentially numbered invoices to the same customer, except in un- usual situations or in cases where they have only a single customer. Sequential invoice checking is a test to determine which vendors of your organization may have only one customer - your organiz- ation. Note that the input data does not need to be sorted. The system does the checking by first sorting the invoice data by vendor and invoice number and then checking if any two invoices represent sequential numbers, i.e. they have a numeric difference of one. For any such instance identified, all the detail information for both invoices is listed in a re- pot for review. To perform the test, only the name of the vendor number column and the name of the column con- taining the invoice number need to be provided. As a simple example, suppose that vendor invoice data is to be tested for sequential invoices and that the name of the column identifying the vendor is called "Vend_No" and the name of the column containing the invoice number is "Invoice_No". The command to perform the check would then be "Vend_No, Invoice_No" (without the quotes). Note that any non-numeric values are removed from the invoice number before a comparison is performed. Thus an invoice number "C102345B" would be transformed to "102345" for purposes of the test. Example 1 Vendor invoice data is to be tested to determine if any vendor has issued sequential invoices. The input data is not sorted. The test to be selected is “Sequential invoices” as selected from the drop down list of commands. The name of the column for the vendor number is named “Vendor”. The test is not limited to any records, so the “where” information is left blank. The “other information” is the name of the Auditing data on Excel worksheets Page 108
  • 138. Audit Commands vendor column and the name of the column containing the invoice numbers, separated by a comma. Results Output results Sequential invoices Output results (pasted into Excel work sheet) Count of sequentially numbered items V201 : 1 The results indicate that only one vendor (“V201”) had issued a sequential invoice and that vendor (“V201”) issued just one sequential invoice. Output results Auditing data in Excel Page 109 worksheets
  • 139. Audit Commands 4.4 Patterns 4.4.1 Round Numbers 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 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. Usage Example 1 In an audit of accounts payable, a comparative analysis is to be made of purchase orders by buyer to determine which buyers purchase orders are the most different from all others as measured by the type and quantity of round numbers. Approach – using the “patternrn” command, check the purchase orders. Audit Command values Column value – [purchase order amount] Text Box – [buyer number], [purchase order amount] Where – (empty) Auditing data on Excel worksheets Page 110
  • 140. Audit Commands Results A list of the results of pattern matching for all buyers. The list is in descending order, first showing the buyer whose pattern is the most different. Note: The transactions do not need to be “pre-sorted”. Usage Example 2 A test is to be performed for usage of round numbers in general journal entries by the person preparing the journal entry. The column name for the journal entry preparer is “preparer”. Approach – using the “patternrn” command, check the journal entries. Audit Command values Column value – [journal amount] Text Box – [preparer], [journal amount] Where – (empty) Results A list of the results of pattern matching for all preparers. The list is in descending order, first showing the preparer whose pattern is the most different. Usage Example 3 A test is to be performed for usage of round numbers in fixed asset costs by location. Pattern analysis using round numbers Auditing data in Excel Page 111 worksheets
  • 141. Audit Commands Output results Pattern analysis using round numbers Auditing data on Excel worksheets Page 112
  • 142. Audit Commands Output results (pasted into Excel work sheet) Key d-stat Chi Square XSF 2.07E-02 6.085982622 AB 2.26E-02 4.260527481 GHF 1.39E-02 1.830195487 FGT 9.12E-03 1.659130377 JHT 9.19E-03 0.747565059 PA 6.26E-02 0.534411792 ABC 2.04E-03 0.500401568 PE 6.26E-02 0.400815832 EFR 1.91E-02 0.392424534 NC 6.26E-02 0.267215216 DSR 1.83E-03 0.162121923 MI 6.26E-02 0.13360994 CF 6.26E-02 0.13360994 This report indicates that the location coded “XSF” is the most different from all other locations as measured by the usage of round numbers. Output results Auditing data in Excel Page 113 worksheets
  • 143. Audit Commands 4.4.2 Data Stratification Pattern analysis using data stratification 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”. Usage Example 1 In an audit of inventory, the inventory values are known to be clustered in a certain pattern. Approximately 20% of all inventory items have a value under $100. Then 50% have a value under $200 and 80% have a value under $500. The stratification ranges used to obtain these results were the bin values of 0, 100, 200, 500 A test is to be made to identify the warehouse location which has inventory value which are the most different from this pattern as measured using data stratification and the bin values above, Approach – using the “Pattern - stratification” command, analyze the inventory values. . Audit Command values Column value – [unit cost] Text Box – [location],[unit cost], 0, 100, 200, 500 Where – (empty) Results A list, by location, of the measures of the difference between the values at that location and Auditing data on Excel worksheets Page 114
  • 144. Audit Commands those of the entire population, as measured using Chi Square. The list is in descending order. Output results Pattern analysis using data stratification Auditing data in Excel Page 115 worksheets
  • 145. Audit Commands Output results (pasted into Excel work sheet) Key d-stat Chi Square ABC 1.26E-03 79.32112 DSR 4.17E-02 58.98408 GHF 2.17E-02 58.02021 JHT 0.079345 57.38157 NC 0.216289 56.3838 AB 2.65E-02 55.07401 FGT 2.73E-02 52.50759 PA 0.230438 51.2955 EFR 6.31E-02 51.25032 PE 0.216289 48.51521 XSF 4.50E-02 47.23957 CF 0.35716 46.83188 MI 0.429626 46.68186 This report indicates that, based upon data stratification, location ‘ABC’ has the largest variance between the results of the data stratification at that location and that of all locations combined. Output results Auditing data on Excel worksheets Page 116
  • 146. Audit Commands 4.4.3 Day of Week Pattern analysis using day of week 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. Usage Example 1 In an audit of revenue in a retail environment, determine which store’s revenue was the most different, based upon analysis by day of week. Approach – using the “patternwd” command, analyze such transactions. Audit Command values Column value – [trans date] Text Box – [store number],[transdate] Where – (empty) Results A listing of summary results, by store location, in descending order Usage Example 2 In an audit of journal entries, determine which account’s postings were the most different, based upon the day of the week they were posted. Approach – using the “patternwd” command, analyze such transactions. Audit Command values Column value – [ posting date] Text Box – [account number], [posting date] Where – (empty) Results Auditing data in Excel Page 117 worksheets
  • 147. Audit Commands A listing of summary results, by account number, in descending order In the example below, a test was performed on asset acquisitions, by day of week. Output results Pattern analysis using day of week Auditing data on Excel worksheets Page 118
  • 148. Audit Commands Output results (pasted into Excel work sheet) Key d-stat Chi Square ABC 1.26E-03 79.32112 DSR 4.17E-02 58.98408 GHF 2.17E-02 58.02021 JHT 0.079345 57.38157 NC 0.216289 56.3838 AB 2.65E-02 55.07401 FGT 2.73E-02 52.50759 PA 0.230438 51.2955 EFR 6.31E-02 51.25032 PE 0.216289 48.51521 XSF 4.50E-02 47.23957 CF 0.35716 46.83188 MI 0.429626 46.68186 Output results Auditing data in Excel Page 119 worksheets
  • 149. Audit Commands 4.4.4 Holidays Pattern analysis using holidays An example will best illustrate the concept of pattern testing by holiday. Consider a case for the retail environment. In some cases, sales tend to be concentrated on certain 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. Usage Example 1 In an audit of revenue in a retail environment, determine which store’s revenue was the most different, based upon analysis by sales on holidays. Approach – using the “patternhol” command, analyze such transactions. Audit Command values Column value – [trans date] Text Box – [store number],[transdate] Where – (empty) Results A listing of summary results, by store location, in descending order Usage Example 2 In an audit of journal entries, determine which account’s postings were the most different, based postings made on holidays. Approach – using the “patternhol” command, analyze such transactions. Audit Command values Column value – [ posting date] Text Box – [account number], [posting date] Where – (empty) Results A listing of summary results, by account number, in descending order Auditing data on Excel worksheets Page 120
  • 150. Audit Commands In the example below, a test was performed on asset acquisitions made on a holiday. Output results Pattern analysis using holidays Auditing data in Excel Page 121 worksheets
  • 151. Audit Commands Output results (pasted into Excel work sheet) Key d-stat Chi Square DSR 1.29E-02 10.68799 EFR 2.30E-02 9.871974 GHF 2.07E-02 6.070443 AB 7.69E-03 4.901453 FGT 9.57E-03 3.471517 JHT 2.50E-02 1.765012 ABC 2.82E-03 1.366258 XSF 2.50E-02 1.330289 PA 2.50E-02 0.10236 PE 2.50E-02 7.68E-02 NC 2.50E-02 5.12E-02 MI 2.50E-02 2.56E-02 CF 2.50E-02 2.56E-02 Output results Auditing data on Excel worksheets Page 122
  • 152. Audit Commands 4.4.5 Benford’s Law Pattern analysis using Benford’s Law 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. Usage Example 1 In an audit of expense reports, a test is to be made to determine which employee’s expense reports were the most different from all other expense reports, based upon Benford’s Law. Approach – using the “patternben” command,analyze expense report transactions. Audit Command values Column value – [expense amount] Text Box – [employee number], [expense amount], F1 Where – (empty) Results A listing of summary results, by employee number, in descending order Usage Example 2 In an audit of inventory counts, a test is to be made to determine which inventory counts were the most different from all other warehouse locations , based upon Benford’s Law. Approach – using the “patternben” command, analyze inventory count transactions. Audit Command values Column value – [inventory count] Text Box – [warehouse], [inventory count], F1 Where – (empty) Auditing data in Excel Page 123 worksheets
  • 153. Audit Commands Results A listing of summary results, by warehouse, in descending order In the example below, the test was performed using cost amounts at various locations. The Benford’s Law test was for first digit, F1. Output results Stop and Go Attribute sampling Auditing data on Excel worksheets Page 124
  • 154. Audit Commands Output results (pasted into Excel work sheet) Key d-stat Chi Square ABC 0.257636 520.197645 DSR 0.309237 62.94220806 GHF 0.28177 45.65568845 AB 0.23824 41.67393551 FGT 0.346857 36.99397174 JHT 0.317603 16.02484576 XSF 0.3 12.12429792 EFR 0.275362 5.825805153 PE 0 0 PA 0 0 NC 0 0 MI 0 0 CF 0 0 The report indicates that, as measured using Benford’s Law, location ‘ABC’ is the most different from the population as a whole. Output results Auditing data in Excel Page 125 worksheets
  • 155. Audit Commands 4.5 Sampling 4.5.1 Attributes – Unrestricted: Stop and Go 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 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) Auditing data on Excel worksheets Page 126
  • 156. Audit Commands 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. 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. An example of the chart output is shown below (attribute test for signature on documents as tested in 25 samples): Auditing data in Excel Page 127 worksheets
  • 157. Audit Commands Figure 14 – Attribute sampling The chart above presents the results of the attribute sample test visually for four confidence levels as follows: 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. Stop and Go Attribute sampling Auditing data on Excel worksheets Page 128
  • 158. Audit Commands How the results are calculated: The upper limit is computed using the following formula (assumes a confidence level of 90%): The lower limit is computed using a similar formula: These formula are based upon the article in The American Statistician: Auditing data in Excel Page 129 worksheets
  • 159. Audit Commands Output results Stop and Go Attribute sampling Auditing data on Excel worksheets Page 130
  • 160. Audit Commands Output results (pasted into Excel work sheet) Sampling results: Sample size 82 Errors 5 Error rate 6.10% Population size 5713 Confidence used 95.00% Z-score 1.95996 Point estimate: 348 Lower limit 116 Upper Limit 777 Confidence used 98.00% Lower limit 93 Upper Limit 865 Confidence used 90.00% Lower limit 141 Upper Limit 705 Confidence used 80.00% Lower limit 172 Upper Limit 627 Output results Stop and Go Attribute Output results (chart) The chart below was specified using a custom color scheme and the title shown. These values are provided using the “Chart” tab on the processing form. Auditing data in Excel Page 131 worksheets
  • 161. Audit Commands Output results - chart Auditing data on Excel worksheets Page 132
  • 162. Audit Commands 4.5.2 Variable Sampling – Unrestricted Stop and Go 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 3. 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. Auditing data in Excel Page 133 worksheets
  • 163. Audit Commands An example of the chart output is shown below (variable test of 14 samples): 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 Usage Example 1 Stop and Go Variable sampling Auditing data on Excel worksheets Page 134
  • 164. Audit Commands The formula used for variable sampling is as follows: The standard deviation is computed using the following formula: The standard error of the mean is The total standard error is The confidence interval is computed using the Student’s T-value as computed using the “Cephes” software (U.S. Department of Energy). Auditing data in Excel Page 135 worksheets
  • 165. Audit Commands Output results Stop and Go Variable sampling Auditing data on Excel worksheets Page 136
  • 166. Audit Commands Output results (pasted into Excel work sheet) Sampling results: Sample size 71 Sample mean 563.29 Sample Std Dev 224.98 Population size 5713 Point estimate: 3,218,048.41 Values at 95% confidence 5713 t-value used 1.99444 Lower limit 2,915,688.41 Upper Limit 3,520,408.42 t-value 1.99444 Values at 98% confidence 5713 Lower limit 2,857,114.01 Upper Limit 3,578,982.81 t-value 2.38081 Values at 90% confidence 5713 Lower limit 2,965,341.39 Upper Limit 3,470,755.44 t-value 1.66691 Values at 80% confidence 5713 Lower limit 3,021,911.79 Upper Limit 3,414,185.03 t-value 1.29376 Output results Variable Sampling – Unrestricted Stop and Go Output results (chart) The chart below was specified using a custom color scheme and the title shown. These values are provided using the “Chart” tab on the processing form. Auditing data in Excel Page 137 worksheets
  • 167. Audit Commands Output results - chart Auditing data on Excel worksheets Page 138
  • 168. Audit Commands 4.5.3 Stratified Variable Sampling – Population Stratified Variable Sampling One of the first steps in performing a stratified variable sample is a determination of the composition of each strata, including its variability, etc. With this information it is then possible to perform either a 1) proportional sample or 2) a disproportionate sample. Generally, auditors will select a disproportionate sample, as typically the population will not be consistent, and thus the sampling should be concentrated in those strata which have the most variability. There is a formula which can be used to determine the optimal counts for sampling, which is referred to as “Neyman’s allocation”. The purpose of the stratified variable population command is to assess the population values by strata and suggest a sample plan based upon Neyman’s allocation, i.e. a disproportionate stratified sample. The formula used are as follows: The estimate of the universe mean: Estimate of universe total: Estimate of the variance of each strata Variance of the entire population: Auditing data in Excel Page 139 worksheets
  • 169. Audit Commands A 95% confidence interval for the entire population is The “z-score” is computed using the inverse normal function of the Cephes software (US DOE). Neyman’s allocation is calculated using the following formula: For purposes of the calculation, the costs of sampling ( c sub I and c sub h) are assumed to be uniform. Output results Stratified Variable Sampling Auditing data on Excel worksheets Page 140
  • 170. Audit Commands Output results (pasted into Excel work sheet) Strata Count Mean Standard Deviation Total Amount 1 345 47.77 28.3 16,481.44 2 337 140.64 35.34 47,394.01 3 696 281.6 72.74 195,996.05 4 1431 480.8 79.45 688,031.46 5 2213 580.69 111.68 1,285,068.46 6 691 841.77 149.38 581,664.24 All 5713 492.67 N/A 2,814,635.66 Neyman Allocation report Strata N Std Amt Pct Samp Size Next 1 345 28.3 9,763.58 1.82% 1 -344 2 337 35.34 11,908.41 2.22% 1 -336 3 696 72.74 50,630.47 9.44% 3 -693 4 1431 79.45 113,690.49 21.20% 6 -1,425 5 2213 111.68 247,139.50 46.08% 14 -2,199 6 691 149.38 103,222.96 19.25% 6 -685 The first part of the report simply lists the basic statistics for each strata, as exist in the data being analyzed. The second report is the suggested sampling counts using the Neyman allocation and the total number of items to be sampled (in this example 30). Output results Auditing data in Excel Page 141 worksheets
  • 171. Audit Commands 4.5.4 Stratified Variable Sampling – Assessment Stratified Variable Sampling Assessing the results of stratified variable sampling. The stratified variable assessment command extrapolates the results of the sample to the entire population. For each strata, the basic statistics of the strata are shown, along with the point estimate, and upper and lower confidence limit using the precision specified. An example of the command is shown below, where: Stratum is the name of the column containing the stratum identifier Audited is the name of the column containing the audited value Selected is the name of the column containing the indicator as to whether the particular row was sampled. This will contain an “X” is the row was selected for sampling. The command in the text box is as follows: Audited, stratum, selected, 30, .95 The “30” value used in the command is used to request Neyman’s allocation values for a total sample size of 30. This value does not affect any of the computations, only provide information to be used in the selection of the next sample. The “.95” is the precision to be used in determining the confidence levels. Output results Auditing data on Excel worksheets Page 142
  • 172. Audit Commands Stratified Variable Sampling Output results (pasted into Excel work sheet) Strata N n Mean Standard Deviation Estimate Lower Limit Upper Limit Point 1 345 2 59.49 0 20,524.05 20,524.05 20,524.05 2 337 2 113.4 0 38,214.12 38,214.12 38,214.12 3 696 7 275.13 67.54 191,488.49 99,353.24 283,623.74 4 1431 15 499.98 42.45 715,477.10 596,425.31 834,528.90 5 2213 32 584.25 117.82 1,292,936.26 781,887.74 1,803,984.78 6 691 13 886.61 65.83 612,649.10 701,798.37 523,499.84 All 5713 71 563.29 80.78 3,218,048.41 2,313,501.12 4,122,595.70 Neyman Allocation report Strata N Std Amt Pct Samp Size Next 1 345 28.3 9,763.58 1.82% 1 -344 2 337 35.34 11,908.41 2.22% 1 -336 3 696 72.74 50,630.47 9.44% 3 -693 4 1431 79.45 113,690.49 21.20% 6 -1,425 5 2213 111.68 247,139.50 46.08% 14 -2,199 6 691 149.38 103,222.96 19.25% 6 -685 Output results Auditing data in Excel Page 143 worksheets
  • 173. Audit Commands 4.5.5 Stratified Attribute Sampling – Population Stratified Attribute Sampling The stratified attribute population command simply prepares a schedule showing the number of items to be tested within each stratum. Such information provides the auditor a basis for making further decisions as to the composition of the samples to be tested. The data values do not have be sorted by strata. Also, although the strata identifiers shown here are numeric, the strata identifiers may have any value. Each unique value will result in a separate strata for sample testing. Usage Example 1 In the example below, the attribute to be tested is identified as “audited”. The name of the column containing the strata identifier is “stratum” and the name of the column indicating whether the value in the row is to be sampled and tested is named “Selected”. Each value selected for sampling is indicated by placing an “X” in the column labeled “selected” (or other name chosen). For attribute sampling, the audited value will be non-blank if the attribute being tested is found to exist. All this is illustrated in a very simple example below: Row Signature Selected Strata 1 A 2 X B 3X X C 4 A 5 B The data being tested consists of five rows, separated into three strata “A”, “B” and “C”. Only rows 2 and 3 have been selected for sampling. The attribute being tested is a signature on a document. The record for row 2 has a signature, the record for row 3 does not. Auditing data on Excel worksheets Page 144
  • 174. Audit Commands Output results Stratified Attribute Sampling Output results (pasted into Excel work sheet) Strata Count 1 594 2 583 3 1132 4 863 5 1399 6 1142 All 5713 Output results Auditing data in Excel Page 145 worksheets
  • 175. Audit Commands Auditing data on Excel worksheets Page 146
  • 176. Audit Commands 4.5.6 Stratified Attribute Sampling – Assessment Stratified Attribute Sampling The stratified attribute assessment command uses the sample results to extrapolate the results to each strata and in total. For each stratum, the point estimate, as well as upper and lower limits are listed. The data values do not have be sorted by strata. Also, although the strata identifiers shown here are numeric, the strata identifiers may have any value. Each unique value will result in a separate strata for sample testing. The command below prepares an extrapolation based upon attribute sampling. The name of the column containing the stratum identifier is “stratum”, the name of the column containing the results of the test of the attribute is called “audited”, and the name of the column indicating if the row was selected for sampling is called “selected”. The confidence level desired for the results is 97%. This the command in the text box is: Stratum, audited, selected, .97 Note: By default, results at the three confidence levels – 80%, 90% and 95% are produced. An additional confidence level may be specified. Output results Auditing data in Excel Page 147 worksheets
  • 177. Audit Commands Stratified Attribute Sampling Output results (pasted into Excel work sheet) Stratified Attribute Report Prepared: 11-12-09 10:45:59 Stratum Sample Items Ratio Universe Projected 1 17 3 17.65% 594 105 2 17 1 5.88% 583 34 3 12 1 8.33% 1132 94 4 12 0 0.00% 863 0 5 12 0 0.00% 1399 0 6 12 0 0.00% 1142 0 Combined 82 5 4.09% 5713 233 Strata Prec 80% Prec 90% Prec 95% Prec 97.3% 1 12.04% 15.45% 18.41% 20.77% 2 7.43% 9.53% 11.36% 12.82% 3 10.62% 13.63% 16.25% 18.33% 4 0.00% 0.00% 0.00% 0.00% 5 0.00% 0.00% 0.00% 0.00% 6 0.00% 0.00% 0.00% 0.00% Lower limit quantity 87 45 9 5 Lower limit percent 1.52% 0.80% 0.17% 0.09% Upper limit quantity 380 421 457 486 Upper limit percent 6.65% 7.38% 8.01% 8.51% Output results Auditing data on Excel worksheets Page 148
  • 178. Access Databases and Excel Workbooks 5 Access Databases and Excel Workbooks 5.1 Overview The procedure for working with data contained in Access databases and Excel workbooks is almost identical to that for working with data which has been “pasted” from the Clipboard, with two exceptions: • The name of the Access database or Excel workbook must be provided • In the case of Excel, the name of the worksheet must be provided, or • In the case of Access, the name of the table or query must be provided. All this information is provided using a form and drop down lists. The rest of the information (e.g. column names, textbox information and “where” information is identical. Auditing data on Excel worksheets Page 149
  • 179. Access Databases and Excel Workbooks Audit Commands 5.2 The “Excel/Access” menu item The input form is contained under the “MS” tab shown below. The processing consists of the following seven steps: 1. Select the file name by clicking on the “File” button 2. Select the Sheet name by clicking on the item in the drop down list. In the case of Excel this will be the sheet names contained in the workbook. In the case of Access it will be the tables and queries contained within the Access database 3. Once the sheet name has been selected, click on the column name to select the information to be processed 4. Select the command to be processed from the menu 5. If applicable, enter any criteria to be used in narrowing the processing “Where” (Note: to obtain help, click the label “Where?” to bring up a help form) 6. If required, enter any information in “Info” box. Note that a help description is displayed on the status bar to assist. 7. Click the “Run” button Auditing data on Excel worksheets Page 150
  • 180. Access Databases and Excel Workbooks Audit Commands 5.3 An example To illustrate the process, the auditor wishes to extract information from a worksheet named “FA” in a workbook named EWP.xls to identify fixed asset records where the fixed asset may have been over depreciated. Below is the process, step by step. Step 1 – select the file The last used directory is shown and the Excel work book named fa.xls is selected. Step 2 – select the work sheet Auditing data in Excel Page 151 worksheets
  • 181. Access Databases and Excel Workbooks Audit Commands Step 3 – select the column name of interest Step 4 – select the command name to be processed Auditing data on Excel worksheets Page 152
  • 182. Access Databases and Excel Workbooks Audit Commands Step 5 – specify selection criteria (if any) In this example, only the information for the location ‘ABC’ is needed. Step 6 – provide any additional information required for command processing Auditing data in Excel Page 153 worksheets
  • 183. Access Databases and Excel Workbooks Audit Commands In this example, no additional information is required. Step 7 – click “Run” When the button labeled “Run” is clicked, the results are written out as a text file report and as a chart to the directory specified under the “Audit” tab. Auditing data on Excel worksheets Page 154
  • 184. Access Databases and Excel Workbooks Audit Commands 5.4 Working with text files The procedure for working with text files is almost identical to that for working with data which has been “pasted” from the Clipboard, with two exceptions: • The name of the directory containing the text file must be provided • The name of the text file included within the directory must be specified All this information is provided using a form and drop down lists. The rest of the information (e.g. column names, textbox information and “where” information is identical. 5.5 The “File” tab The input form is contained under the “File” tab shown below. Auditing data in Excel Page 155 worksheets
  • 185. Access Databases and Excel Workbooks Audit Commands The processing consists of the following seven steps: 1. Select the name of the directory by clicking the “Folder” button 2. Select the file name by clicking on the name in the drop down list. 3. Once the file name has been selected, click on the column name to select the information to be processed 4. Select the command to be processed from the menu 5. If applicable, enter any criteria to be used in narrowing the processing “Where” (help is available by clicking the label “Where?”) 6. If required, enter any information in “Info” box. Note that a help description is displayed on the status bar to assist. 7. Click the “Run” button 5.6 An example To illustrate the process, the auditor wishes to analyze information from a text file named “FA.txt” in the directory “c:testdata” to identify fixed asset records where the fixed asset may have been over depreciated. Below is the process, step by step. Step 1 – select the directory Auditing data on Excel worksheets Page 156
  • 186. Access Databases and Excel Workbooks Audit Commands The last used directory is shown and the Excel work book named fa.xls is selected. Step 2 – select the file Step 3 – select the column name of interest Auditing data in Excel Page 157 worksheets
  • 187. Access Databases and Excel Workbooks Audit Commands Step 4 – select the command name to be processed Step 5 – specify selection criteria (if any) In this example, only the information for the location ‘ABC’ is needed. Auditing data on Excel worksheets Page 158
  • 188. Access Databases and Excel Workbooks Audit Commands Step 6 – provide any additional information required for command processing In this example, no additional information is required. Step 7 – click “Run” When the button labeled “Run” is clicked, the results are written out as a text file report and as a chart to the directory specified under the “Audit” tab. Auditing data in Excel Page 159 worksheets
  • 189. Access Databases and Excel Workbooks Audit Commands 6 Techniques for “Drill Down” Drilling down to information of interest is enabled through the use of the “Where” information. A separate tab is provided in order to enter the information if it is lengthy or complex. Note: This form can also be shown by clicking on the label “Where?”. The form is displayed. Auditing data on Excel worksheets Page 160
  • 190. Access Databases and Excel Workbooks Audit Commands There are numerous examples of possible “where” clauses. To help, there is a drop down list of examples which can be selected and then tailored to specific uses. In the screen above, the auditor wishes to extract information within the last 30 days. The example shown provides a mean to do this. All that needs to be done now is to change the name of the column to one that is of interest (unless the column of interest is named “acquisition”). Below are tables which provide examples of some of the functions with a brief description. More complex criteria can be applied using combinations of the functions or “nesting” which is described below. Auditing data in Excel Page 161 worksheets
  • 191. Access Databases and Excel Workbooks Audit Commands 6.1 Numeric Function Example Description Numeric equality [asset cost] = 1000 Asset cost is exactly 1,000 Greater than [asset cost] > 1000 Asset cost is greater than 1,000 Less than [asset cost] – Net Asset cost is less than 1,000 [accumulated depreciation]< 1000 Greater or equal [asset cost] >= 1000 Asset cost is greater than or equal Less than or equal [sales amount] * .04 <= 10 Tax amount at 4% is less than or equal to 10 Not equal [asset cost] <> 1000 Asset cost is not 1,000 Mod [asset cost] mod 10 – 2 Asset cost ends in 2 Mod [asset cost] mod 100 – 0 Evenly divisible by 100 Abs Abs([asset cost] – 100) <= Asset cost is within $.02 of 100, i.e. .02 99.98 – 100.02 Rnd Rnd() A random number Is numeric Isnumeric Isnumeric(amount) = -1 Round Round(cost,2) Round the cost to the penny 6.2 Text Function Example Description Length Len(location) = 6 Length of location name is six characters Mid Mid(location,2,3) Character positions 2 3 and 4 Left Left(location,2) = ‘AB’ Left most two characters Right Right(location,2) = ‘XY’ Location name ends in XY Instr Instr(location,’test’) > 0 Location contains the text ‘test’ LCase Lcase(lastname) = “smith’ Lower case value for last name Ucase Ucase(lastname) = Upper case values ‘SMITH’ Trim Trim(lastname) = ‘smith’ Remove left and right blanks Ltrim Ltrim(lastname) Remove blanks on the left Rtrim Rtrim(lastname) Remove blanks on the right Auditing data on Excel worksheets Page 162
  • 192. Access Databases and Excel Workbooks Audit Commands 6.3 Date / Time Function Example Description Hour Obtain hour portion of Length of location name is six characters date/time value minute Obtain minute portion of Character positions 2 3 and 4 date/time value second Obtain second portion of Left most two characters date/time value year Obtain yearr portion of Location name ends in XY date/time value month Obtain month portion of Location contains the text ‘test’ date/time value day Obtain day portion of date/ Lower case value for last name time value Weekday Day of week 1 – 7 Weekday(datevalue) = 1 (check for Sunday) Date validity Isdate(datecol) = -1 Check for an invalid date Difference between DateDiff(‘d’,date1,date2) Measure difference between dates in dates days Date arithmetic add DateAdd(‘d’,5,DateValue) Add five days to the date value Date arithmetic add DateAdd(‘m’,3,DateValue) Add three months to the date Date Part DatePart(‘m’,DateValue) Obtain the month Date Part DatePart(‘y’,dateValue) Obtain the year Auditing data in Excel Page 163 worksheets
  • 193. Access Databases and Excel Workbooks Audit Commands 6.4 Logical tests Function Example Description OR Cost < 100 or life > 7 Test that at least one of the conditions is true AND Cost < 100 and life > 7 Test that both conditions are true NOT Obtain second portion of Left most two characters date/time value BETWEEN Trandate between Values between a date range #7/1/2005# and #6/30/2006# BETWEEN Amount between 100 and Value between 100 and 900 900 BETWEEN Location between ‘AB’ Value between ‘AB’ and ‘LM” and ‘LM” IN Location Value is one of three specified values in(‘103’,’105’,’106’) LIKE Location like ‘10%’ Location name starts with 10 6.5 Combinations Functions can be combined using the logical tests described in section 7.4. For example, to test asset records acquired during a specific fiscal period which also have useful lives exceeding ten years the criteria would be specified as follows using the “AND” connectior: ([installation date] between #7/1/2007# and #6/30/2008#) and ([useful life] > 7) 6.6 Nesting functions Often several functions need to be applied at the same time. For example to test if the first three letters of the last name are ‘Bla’, without considering case the following criteria would be applied: Auditing data on Excel worksheets Page 164
  • 194. Access Databases and Excel Workbooks Audit Commands Ucase(left([last name],3)) = ‘BLA’ If the last name may also have blanks to the right of the last character, then an additional function (“trim”) could be first applied before the remaining tests: Ucase(left(trim([last name]),3)) = ‘BLA’ 6.7 Selection criteria There are at least three separate techniques for the identification of ranges or multiple values: 1. Between 2. In 3. Like The between operator allows the specification of a range of values which may be text, numeric or date – e.g. Between #7/1/2007# and #6/30/2008# Between ‘A’ and ‘M’ Between 100 and 2000 The in operator allows the specification of a number of text values, each separated by a comma, e.g. to test if a specific state code has been located: [State Code] in (‘FL’,’GA’,’AL’,’NC’) The like operator allows tests for patterns. Operator Meaning [last name] like ‘BLA%’ Last name starts with ‘BLA’ Auditing data in Excel Page 165 worksheets
  • 195. Access Databases and Excel Workbooks Audit Commands Auditing data on Excel worksheets Page 166
  • 196. Access Databases and Excel Workbooks Audit Commands 7 Appendix – Software installation Installation of the software is a straightforward process, using the standard “Setup.exe” method. There are two types of installs: 1. “regular” install 2. “silent” install For a “silent” install, the software is installed with all the default values – no interaction is required. This section of the guide will discuss the “regular” install. Double clicking the file “ACSetup.exe” brings up the splash screen asking if you wish to install the Audit Commander. Auditing data in Excel Page 167 worksheets
  • 197. Access Databases and Excel Workbooks Audit Commands Step 1 Step 2 Step 3 Auditing data on Excel worksheets Page 168
  • 198. Access Databases and Excel Workbooks Audit Commands Step 4 Step 5 Auditing data in Excel Page 169 worksheets
  • 199. Access Databases and Excel Workbooks Audit Commands Step 6 Step 7 Auditing data on Excel worksheets Page 170
  • 200. Access Databases and Excel Workbooks Audit Commands Step 8 Auditing data in Excel Page 171 worksheets
  • 201. Access Databases and Excel Workbooks Audit Commands Auditing data on Excel worksheets Page 172
  • 202. Access Databases and Excel Workbooks Audit Commands 8 Comment Form Windows version ______________________________ Audit Commander version _______________________ Functions described ____________________________ Comments Please send any comments, suggestions or items identified as errors to: Mike.Blakley@ezrstats.com 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. Auditing data in Excel Page 173 worksheets