Link to home
Start Free TrialLog in
Avatar of TracieD

asked on

Macro cannot read floating point numbers.

This Excel worksheet has a macro working well except those columns in DIVERSIFIED category (in 1st sheet), we use floating point numbers and they can't be read into the Matrix (Risk Matrix sheet). When you run the macro by clicking on Start Risk Maxtrix, every category table is filled out except Diversified table where only integer numbers are filled in. Is there a way to fix this problem? Thanks alot.
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm not sure, but I didn't see any type of dim statements.  It's quite possible that unless you dim the variable as double, you'll get Excel auto diming the statements as integer.

so add

dim k as double

 to the top of the code.

I assume based on the other comment that is the problem variable.
Avatar of TracieD


thanks. It works now. I didn't realize that little code of line in the 1st place.