redim

  1. NicholasP

    Email sending with subject line in Chinese Characters

    I have some code that works fine on my machine, but when my coworker runs it, the subject line comes through as Chinese characters. The email still sends with the file attached, but the subject line has the Chinese characters. Has anyone seen this before or have any ideas as to why this is...
  2. S

    Maximum Size for a 2 dimensional array

    Hi - Been a while, but I'm hoping to find a way to fix a limitation on a reconciliation tool I designed a while back to compare two extracts from an SQL database. In particular I'm having trouble on memory limitations when Resizing a Variant array: ReDim Ukey(1 To MyDict.Count, 1 To ((H - 1)...
  3. S

    Minimum Value

    Dear all I am trying to find the minimum value in the array Stress(i,j) The maximum value appears correct. However the minimum value always appears zero if all the elements are positive. Kindly help I am posting the code below Private Sub CommandButton1_Click() Dim i As Integer Dim...
  4. L

    Clearing empties from a 2d array

    Hey guys, i have an array, once creating it i make it 2d: ReDim allPksWithEmpty(1 To lastRow, 1 To 2) Since I'm not able to set the 1st dimension anymore, i cap it out at maximum rows in sheet. Of course i only pick up a little data depending on some ifs, thus i end up with a big array...
  5. K

    Limit numbers for X and 2

    Using Excel 2000</SPAN></SPAN> Hi,</SPAN></SPAN> The code below generate any combinations I use for example Const v& = 4 to 14 where Array is ("1", "X", "2") (3^4=81, and 3^14=4.782.969) so in the given example 3^4= 81 combinations are generated in the column A and column C & D there is a...
  6. L

    extending array per every input

    Hey guys, im trying to fill up my array and extended whenever needed: arraySizeX = 1 arraySizeY = 2 ReDim Preserve orderArray(1 To arraySizeX, 1 To arraySizeY) orderArray(1, 1) = "test" orderArray(1, 2) = lastRow - 1 arraySizeX = arraySizeX + 1 ReDim Preserve orderArray(1 To arraySizeX, 1 To...
  7. 2

    ReDim Preserve Query

    Hi, I have the following vba code, which populates an array with the contents of the first 5 rows of column A. Sub populate_array() Dim parameters_2DArray as Variant parameter_2DArray = Worksheets("Sheet1").Range("A1:A5").Value [rest of code] End Sub I'm assuming the parameter_2DArray...
  8. J

    Error in passing data from a Function to a Subroutine

    I have a function from which I am passing data to a subroutine and then populating the output. When I am using x, y as is, I am getting the output, but when I use arr1, arr2 instead I do not get an output. The code is: Option Explicit Option Base 1 Public Function Func1(ByVal x As Range, ByVal...
  9. T

    How do I insert non-adjacent columns into an array?

    Hello all you MrExcel experts I have a sheet with 26 columns and approximately 250,000 rows of data. The number of columns will stay the same, however, the number of rows will increase. I will be comparing data in columns 'B, D, N, Q', and depending of the results of that comparison, some...
  10. J

    How do I find the number of dimensions of an array in VBA?

    So if I have dim varArray1() as Variant dim varArray2() as Variant redim varArray1(1,1,1,1) redim varArray2(10,10,10) How do I get something like GetDimensions(varArray1)=4 GetDimensions(varArray2)=3
  11. D

    Help populating multiple arrays with one for loop

    I apologize if this has been answered elsewhere...I searched for quite a while and found nothing specific for what I am hoping to do. I am trying to populate multiple 1D arrays with a nested For Next loop. I have tried to use a string to build the array name (ie. arr1, arr2, etc.) and...
  12. A

    Verify Value Of All Controls Added Dynamically Upon Exit Using With Events Method

    Hello All, I have created a blank user form. Dynamically I have added Text Box, Label, Check Box and command Button to it. I have been able to handle the even generated while command button is clicked.Upon clicking the command button, user form will be unloaded. However I am trying to validate...
  13. S

    Cannot assign value of calculated range cell to a variable

    This is driving me bonkers. I don't think I've ever had this issue before but... I have a function that takes several ranges from a spreadsheet and calculates a spline curve from them. The mechanics aren't important. Because this thing is having trouble in a REALLY WEIRD WAY. The function is...
  14. K

    Row and Column Count for a lookup array

    Can someone show me the best way to do a Row and Column count for this lookup array? [ ReDim aTrades(1 To 4, 1 To 2) As Variant ReDim aSystemCodes(1 To 69, 1 To 2) 'todo: do a row and column count of the above lookup arrays and use variables /]
  15. S

    User Defined Function Error "subscript out of range"

    I am writing a UDF to return array variants given the UDF subscript values. The UDF is below: Function LogPriceData(Arr As Variant, numberObs As Integer) As Variant Dim yy As Integer Dim Array1() As Variant: ReDim Array1(1 To numberObs) Dim Array2() As Variant: ReDim Array2(1 To...
  16. M

    what's wrong with this code

    it keeps ignoring the last condition... If zz Like Left(Replace(activ_code, 0, "?"), Len(Replace(activ_code, 0, "?")) - 1) & "1" _ And Left(zz, Len(zz) - 1) <> Left(activ_code, Len(activ_code) - 1) _ And...
  17. M

    What does this vba mean????

    What does Dim DC() mean? I'm used to only seeing "Dim as" whatever. What does this code do? Dim DC() ReDim DC(LCol - 6) For i = 0 To LCol - 6 DC(i) = i + 6 Next
  18. L

    Urgent help needed - "Runtime error 9: subscript out of range"

    Hi all, I am currently finishing my master thesis including simulations and have run into an issue. I am running simulations through a "Monte Carlo" macro that was imported from another work book. After each run I receive the error message "Runtime error 9: subscript out of range". When I...
  19. M

    VBA Copy data from Array to another help

    Hi all, I am learning more about Arrays but I got to this point & I am stuck & need some help here. So in "Sheet1" I have a list of data that spreads for about 17k rows & over 9 columns & in "Sheet2" I have list of values that I type in column A which then I am looping against my data from...
  20. M

    VBA FILTER function: SourceArray argument causing Type Mismatch error?

    Hi guys, I have a piece of code which requires using the FILTER Function, however the SourceArray argument is giving me a Type mismatch error, any help would be greatly appreciated. This doesn't work Dim bDistinct as Boolean Dim arrList2() Variant Redim arrList2(1 to 1559, 1) arrList2 =...

Some videos you may like

This Week's Hot Topics

  • SUMPRODUCT active link formula
    Hi guys i have sumproduct formula for counting two range of number, i want count active cells of formula that linked to another sheet...
  • Block certain cells in condition met in cell A
    Hi there, trying to figure out step by step how to build macros and learn more. Now given that my other code was a mess, I figured I would...
  • IF FUNCTION FIRST, THEN WITH INDEX AND MATCH
    Hi, Below formula works well, =(INDEX('PRICE LIST'!$C$7368:$C$7679,MATCH(1,(WORKSHEET!O28='PRICE LIST'!$A$7368:$A$7679)*(WORKSHEET!P28='PRICE...
  • Match data from 3 columns to return data from the correct 4th column
    Hi there! I'm trying to have a cell auto-populate the data in a cell based on the data entered in 3 other cells. I've pasted a copy of the...
  • VLookup
    Hi everyone, I need to find the value from one sheet to another. So in Sheet A Field N5 I have a value (Spark) I want to find Spark on the Sheet...
  • Defining a range
    Private Sub Worksheet_Calculate() Dim Xrg As Range Set Xrg = Range("K1") If Not Intersect(Xrg, Range("K1")) Is Nothing Then MsgBox...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top