Macro error

Macro error

I'm new to Zoho sheets, and have been having issues with Macros (if statements in particular). Currently I receive the following message when running a macro (copy/paste from excel vba).

Unknown function Worksheet_Change

Below is the code, starting with the line that referred to in the error.

  1. If count >0 Then
  2.     Range("A2:A999").ClearContents
  3.     Worksheets("Want List").Select
  4.     i = 9
  5.     Do While Cells(i, 2) <> ""
  6.         i = i + 1
  7.     Loop
  8.     For j = 1 To UBound(Qty)
  9.         If i + j - 1 = 9 Then 'Re-number the Line No column
  10.             Cells(i + j - 1, 1) = 1
  11.         Else
  12.             Cells(i + j - 1, 1) = Cells(i + j - 2, 1) + 1
  13.         End If
  14.         Cells(j + i - 1, 2) = Item_No(j - 1)
  15.         Cells(j + i - 1, 4) = Description(j - 1)
  16.         Cells(j + i - 1, 8) = Qty(j - 1)
  17.     Next j
  18. End If
The macro appears to run up to line 13 before returning the error. I have had similar problems where a macro will run correctly, but return an error referring to an if statement. I assume the issue is not with the if statement, but within in the coding contained in the if statement. 

Any suggestions on where to start (I am not aware of a step through or debugging system in Zoho.