Multidimensional Arrays in Excel VBA Last Updated : 29 Oct, 2022 Comments Improve Suggest changes Like Article Like Report Multidimensional Arrays are used to store data of similar data types of more than one dimension. A multidimensional array has a dimension up to 60 but usually, we don't use arrays of dimensions more than 3 or 4. Here, we will see how to declare a multidimensional array in many ways and also how to create and re-size the multidimensional array Declare a 2D Array To declare a 2D array we have to use "Dim" then the name of the variable where it will store the 2D array and the dimension of the 2D array will be separated by commas. In the following code, a 2D array is declared as a "4 x 5" 2D array in a single line which is also known as a fixed array whose dimension can't be changed later This same array can also be declared explicitly using "To" Dynamic Array It is used to declare an array in two lines and we can also change the dimension of the array. Only the upper bound of the last dimension i.e column can be changed Note: By default, the lower bound of an array is 0, and the upper bound of an array is n. Where, Lower bound is the lowest index of the array.Upper bound is the highest index of the array. In the following code, an array variable is declared in one line using "Dim" and in another line using "ReDim" we can declare the dimension of the array We can also "ReDim". We can also change the dimension of the array. In the following code, we have changed the upper bound dimension of the column from 6 to 8 Array Function Using Array function we can also declare the multidimensional array which gives us the benefit of declaring an array of variant data type Creating and Displaying a 2D Array In the following code, we will declare a 2D then we will assign values to it, and then we will display it using a nested for loop. Output Resizing the Array using ReDim Preserve The following code is written to declare and assign a 2D array after that to change the dimension of the array. Comment More info A ayushdey110 Follow Improve Article Tags : Excel Excel-VBA ExcelGuide Explore MS Excel Tutorial - Learn Excel Online Free 11 min read Excel FundamentalIntroduction to MS Excel 5 min read Download and Install MS Excel 2024/365 Edition 4 min read Excel Spreadsheet 4 min read Workbooks in Microsoft Excel 4 min read Worksheets in Excel 4 min read Workbooks in Microsoft Excel 4 min read Delete All Rows Below Certain Row or Active Cell in Excel 5 min read Remove Hyperlinks in Excel 6 min read How to Use Fractions in Excel 6 min read Excel FormattingData Formatting in Excel 5 min read Expand Cells to Fit the Text Automatically in Excel 3 min read Excel Date and Time Formats 3 min read Insert a Picture in a Cell in MS Excel 3 min read How to Unhide and Show Hidden Columns in Excel: Step by Step Guide 9 min read Conditional Formatting in Excel 8 min read Apply Conditional Formatting Based On VLookup in Excel 3 min read How to Compare Two Columns and Delete Duplicates in Excel 3 min read How to Find Duplicate Values in Excel Using VLOOKUP 3 min read Excel Formula & FunctionBasic Excel Formulas 3 min read Use of Concatenate in Excel 5 min read Percentage in Excel 8 min read Excel LEFT, RIGHT, MID, LEN, and FIND Functions 5 min read Excel IF Function 10 min read Excel VLOOKUP Function 12 min read Dynamic Array Formulas in Excel 2 min read COUNTIF Function in Excel - Step by Step Tutorial 7 min read How To Use MATCH Function in Excel (With Examples) 6 min read Excel Data Analysis & VisualizationHow to Sort by the Last Name in Excel? 5 min read How to Sort Data by Color in Excel? 3 min read How to Swap Columns in Excel: 3 Methods Explained 8 min read Sparklines in Excel 8 min read Pivot Tables in Excel 3 min read How to Sort a Pivot Table in Excel : A Complete Guide 7 min read Pivot Table Slicers in Excel 5 min read Data Visualizations in Power View 3 min read Chart Visualizations in Excel Power View 8 min read Table Visualization in Excel Power View 5 min read Multiple Visualizations in Excel Power View 4 min read Dynamic Excel Dashboards Using Picklists 3 min read Advanced ExcelHow to Use Solver in Excel 3 min read Power Query â Source Reference as File Path in Cell 2 min read How to Create Relational Tables in Excel? 4 min read How to Import, Edit, Load and Consolidate Data in Excel Power Query? 7 min read Connecting Excel to SQLite 4 min read Handling Integers in Advanced Excel 2 min read Power Pivot for Excel 10 min read Excel Power Pivot - Managing Data Model 6 min read Table and Chart Combinations in Excel Power Pivot 3 min read Excel Data VisualizationAdvanced Excel - Chart Design 4 min read How to Create a Graph in Excel: A Step-by-Step Guide for Beginners 8 min read Formatting Charts in Excel 3 min read Create a Waterfall Chart in Excel 5 min read Scatter and Bubble Chart Visualization in Excel 5 min read Create a Pie Chart in Excel 5 min read How To Create A Pictograph In Excel? 3 min read How to make a 3 Axis Graph using Excel? 7 min read How To Create a Tornado Chart In Excel? 2 min read How to Create Flowchart in Excel: Step-by-Step Guide 6 min read Excel VBA & MacrosHow to Insert and Run VBA Code in Excel? 2 min read Variables and Data Types in VBA Excel 9 min read How to Use the VBA Editor in Excel: Quick Guide 2024 7 min read VBA Strings in Excel 8 min read VBA Find Function in Excel 5 min read ActiveX Control in Excel VBA 3 min read Multidimensional Arrays in Excel VBA 2 min read VBA Error Handling 10 min read How to Remove Duplicates From Array Using VBA in Excel? 2 min read Macros In Excel With Examples 10 min read Assigning Excel Macro to Objects 3 min read How to Enable Macros in Excel (2025): Step-by-Step Guide 9 min read Power BI & Advance Features in ExcelPower BI - Tools and Functionalities 5 min read Power BI - Data Sources and its type 4 min read Power BI - Data Sources and its type 4 min read Power BI - How to Create a Report using Excel Data in Workspace 4 min read Data Analysis Expressions (DAX) 7 min read Power BI - How to upload Excel Files to Dashboard? 3 min read Like