View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Philosophaie Philosophaie is offline
external usenet poster
 
Posts: 110
Default Keep getting "Type mismatch"

I found the problem. It was in the syntax:

I first entered:
deg(h) = CDbl(.Cells(2 + h, 3))

The fix was:
deg(h) = CDbl(.Cells(h+2, 3))

Just transposing the variable to the first position and the number to the
second fixed the anomaly.

Excel did not like the variable in second position like that.