We know that it is an excellent tool to easily create spreadsheets in Microsoft Excel; but at the same time, we need to know a bit of programming to maximize its functionality. That’s why here we show you how to resize an array or dynamic vector in Excel.
If you want to resize an Array it is because the previous data has increased (generally this is why we deserve to do this resize). Declaring and working with arrays or two-dimensional arrays in Excel IS NOT EASY, but it can be easily simplified.
What should you do to resize an array or dynamic vector in Excel?
Mainly we must know that a dynamic vector is one that we use when we do not have the certainty that the data in a list will be durable, if not, that they can increase or decrease with the passage of time.
Although we recommend that you create the dynamic vector from the beginning of the work; so that it is easier to resize it over time or as the items that comprise it increase.
Now, how should you create this vector so that you can resize it to your liking? Well, very simple, Excel allows you to create it with the option of ” Visual Basic “, we just have to create the array as we normally do.
We open a sheet with the command ” Alt + F11 ” and we must start entering the code, we will use as an example name for the Family array ” Dim Family () as the string “.
We must leave the space between the parentheses blank, in this way we can not assign a size to the vector we are creating. It is possible the best most useful keyboard shortcuts to use in Excel and speed up the work a bit.
Later we establish a size with the code ” ReDim Family (1 to 5) as String “, this will establish the first size to our vector that later we can modify.
Now, in order to resize an array or dynamic vector, we must enter a code that helps us to maintain the previous data and enter the new ones, we will achieve this through the code ” ReDim preserve Family (1 to 9) “, the importance of using this code with the word ” preserve ” is that it will prevent the previous data from being erased.
With this combination of codes you will be able to change the size of the array as many times as you want; always avoiding creating new unnecessary vectors that take up space and make it difficult to carry out tasks.
How does it benefit us to have a dynamic vector that we can resize to our liking?
If we look closely at the market in which Excel is used, in a way everything is related to business administration; accounting or inventories, so it is easy to predict that everything we create with this tool may be subject to change.
Taking into consideration a company that wants to organize its client portfolio, which can increase or decrease at any time, a dynamic vector is shown as the most suitable option.
Expanding a vector linked to an inventory that grows exponentially, as a company acquires new products, is also a good example to justify the use of this tool.
Also providing the ability to copy this vector and use it in any other document, in this way once the vector is created it allows us to have it as a reserve. We also highlight the ability to create vectors in our spare time that we can use for a large number of jobs.
How important is it that we know how to resize an array or dynamic vector?
If we take into account that this option is included among those associated with advanced knowledge of Excel; This takes us a little further when offering our services to any company.
Knowledge of Excel is highly valued today; This, associated with the number of options and the ability to create a large number of tables, text sheets, indexes, graphics and an infinity of other qualities that make the person who handles this tool, is a great acquisition for any company.