Is there a way do matrix operation using VBA? I'm trying to have my matrix come out in reduced row echelon form? Some examples of what I'm trying to do are attached.

Ex: 1) 5 9 -5 1 0 0
1 13 2 0 1 0
-1 5 -3 0 0 1
numbers entered desired results

Ex: 2) 0 2 5 1 0 0
-1 0 65 0 1 0
9 6 35 0 0 1
numbers entered desired results

Ex: 3) 1x 1y 2z =8
-1 -2y 3z =1
3x -7y 4z =10

1 1 2 8 1 0 0 3
-1 -2 3 1 0 1 0 1
3 -7 4 10 0 0 1 2
numbers entered desired results

is there a way to have it set to where it will give me the desired results no matter what numbers are entered using legal matrix operations?