Hello! I have a code to create matrix. This is last step to automatize as many stocks as I want in a covariance matrix(this is prior to actual matrix, but its same principle). I have a problem with some variables, because everything has to be dynamic. First I calculate how many cells that are used in the range. Then the code selects a range based on that value. This is no problem, but I need the formula to be dynamic. I need 2 variables at least; 1) is starting at A2 and select all used cells in the area(endToRight AND endDown). 2) is starting at A1003 and select used cells (endToRight). The formula should be first variable-second variable.
Here is the code:
Everything in [B] code works fine and needs to be like that. It can change if it needs to be changed, but that part works fine.
The error says; Can`t set formulaArray-properties in range class. Run time error 1004
I appreciate any help!
Bookmarks