1. B

    ReDim Runtime Error 13- Mismatch

    Hi all, I've pieced together the below code from other forums to achieve something I thought would be relatively simple, but it has thrown up an error which I'm not capable of solving. I have two ranges B44:E58 and H44:K58- products are listed starting at B44 with various details in the...
  2. R

    Expand array of dates based on 2 criteria (VBA)

    Hi I have a counter with a minimum value of 17. As long as this value is not reached, then extra dates should be added to an array of dates. The extra dates should be workdays: if for example 2 extra dates are needed to reach the 17 value, but the 24th of December is not a workday, yet 23rd and...
  3. 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...
  4. 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)...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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
  13. 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...
  14. 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...
  15. 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...
  16. 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 /]
  17. 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...
  18. 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...
  19. 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
  20. 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...

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
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 "".
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