Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: inputting variables in vb macro

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hello,
    Im trying to create a function to solve linear equations in excel. I have the algorithm, but I need to be able to input 6 variables 2 columns by 3 rows. The first column go in order 1, 2 3 go into x1,x2,x3 as integers, and the second column 1,2,3 go into y1,y2,y3. I just want to be able to select matrix and have the data input into the macro. Im grateful for help
    Thanks
    Casey

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Brampton
    Posts
    328
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Declare an array for three rows and two columns as follows:

    Dim VarArray(2,1) As Double

    then initialize the elements based on the cells value eg.:

    VarArray(0,0)=Cells(r,c).Value

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •