Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Reddit
Contact us
Hide Buttons

VBA-Excel: Arrays – Multi Dimensional Array

Multi Dimen­sional array has more than 2 dimensions.

For cre­at­ing multi dimen­sional array, Fol­low the below status:

  • Declare the multi dimen­sional Array
  • Store val­ues in array
  • Retrieve val­ues from array


Declare the multi dimen­sional Array

Dim arrMatrix(1 To 9, 1 To 3, 1 To 3)

Store val­ues in array

arrMatrix(1, 1, 1) = mainWorkBook.Sheets(“Sheet1”).Range(“E5”).Value

arrMatrix(1, 2, 1) = mainWorkBook.Sheets(“Sheet1”).Range(“E6”).Value

Retrieve val­ues from array

      Msg­box  arrMatrix(1, 2, 1)

Exam­ple:  SUDOKU Solver

Multi Dimensional Array - SUDOKU SOLVER

Multi Dimen­sional Array — SUDOKU SOLVER


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: