View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.programming
narutard[_16_] narutard[_16_] is offline
external usenet poster
 
Posts: 1
Default counting and loops


it keeps giving me an error - type 13

maybe if i show u my code ..that might help

For i = 0 To dic.Count

If x(i) = 245 Then
counter = counter + 1
unknown = -1 * (y(i) - 1)
place = place + y(i)
Range("d" & place).Select
temp2 = "=countif(R[" & unknown & "]C[-3]:RC[-3],""azw"")"
Cells(counter, "g") = temp2
Cells(counter, "h") = y(i) - temp2

End If
Next

temp2 line = some reason the var unnown doesn't save the y(i) variable
cells(counter,"h") line i get type 13 error

so i'm thinking its the type of variable..i dunno..

hopefully u can enlighten m

--
narutar
-----------------------------------------------------------------------
narutard's Profile: http://www.excelforum.com/member.php...fo&userid=2511
View this thread: http://www.excelforum.com/showthread.php?threadid=38758