well vec is not defined because I am using it as a function and therefore it isnt required to be defined. The origin has something to do with this problem as if i set the origin to zero in worksheet preferences both work. I think I have some sort of misunderstanding of the array indexing that...