View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sody Sody is offline
external usenet poster
 
Posts: 5
Default type mismatch error in Benford's law macro

I am trying to run a Benford's law analysis. I get a run time error 13 -
type mismatch at the following point of the macro:
For Colcells = 1 To Row
x = Left(Cells(Colcells,Step), 2)
If x 9 Then
Arraytwotest(x) = Arraytwotest(x) +1
End If

There is a series of arrays for each of the 9 digits of a number. going from
arrayone to arrayzero. Then there is an array named arraytwotest(10 to 99)
as Integer so that a one digit number does not create an error. This is a
fraud application that published in the Journal of Accountancy in August 2003
with an accompanying download. I downloaded the excel worksheet with macros
and did not make any changes other than import my data file. Any suggestions?