redim array

  1. G

    Why does #VALUE error in VBA function occur when creating a ReDim Matrix of Stock prices from a Named Range?

    ' Spot = Spot Price of the underlying ' K = Strike Price ' T = Option Maturity in Years ' rf = Interest Rate in decimal (i.e, for 5%, use 0.05) ' vol = Yearly volatility of the underlying in decimal ' n = Number of time steps ' OpType = 'C' for Call and 'P' for Put ' ExType = 'A' for...
  2. 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...
  3. G

    Make small variant array from big array based on Value

    Hi folks, I have a variant array that I would would like to break up into individual arrays and I'm realizing I haven't figured out how to do that yet. Mini-sheet example below. Goal: In vba (not in sheet) array would like to either A) Make smaller arrays for each department based on the...
  4. W

    Redim doesn't work after script was run successfully

    Hi there, I managed to run the script only once without error. But now I get a value error and it seems that the Redim is not resizing the arrays. Originally I used Redim Preserve but after the error I also tried to resize them at the initialization, but neither of them seems to work now. Here...
  5. T

    Redim a dynamic 2D array error - subscript out of range

    I am writing a VBA code which loops through a defined range in a worksheet, finds the filled cells within its limits and assigns the x,y values of each cell into an array. This is my code: Sub FindCells() Dim lWidth as Integer, lHeight as Integer 'both of these parameters are subject to...
  6. R

    Trouble with ReDim Preserve and array

    Relatively newbie to VBA and I've been having problems with this code. It worked at one time, but for the life of me I can't figure out why it can't find the first item in the array. What I'm trying to do is search a directory for Excel files that match a specific word (this works) and store...
  7. U

    ReDim Public Array -- Compile error: Array already dimensioned

    I have two public arrays that I am using on one worksheet. When I run the code for one of the tests it shows 13 variables were read in. When run the test again and only one variable should have been added I still see 13 variables. This is why I am trying to clear the array each time I start. All...
  8. B

    VBA Dynamic Array - ReDim

    Have a spreadsheet with two columns. Parse data, both the # & letters; then output onto bucketed i.e. 1-100 tab w/corresponding letter/ <tbody> 7.259764189 a 271.7909785 b 69.12924367 c ... ... </tbody> Writing VBA code (even though this could be done manually) so that the numbers are...
  9. mkvarious

    ReDim Preserve Array Error, Dynamic Array

    hello, I have a column with data that I work with (let's call it A). Based on A I get data from AS400 PCCOM IBM emulator (let's call it B). What I need to check on is whether B data is unique or not. If B is a duplicate, then I need to check whether C column (value known from the beginning)...
  10. M

    How to dim a matrix?

    Hi, I tried do: Dim MtxVal() As String ReDim MtxVal(1 To final + 1, 1 To LastColNumb + 1) but its not running. What could I do when I don't know values of parameters "final" and "lastcolnumb"?
  11. S

    Excel Array construction

    Hi everyone, I have a difficulty in working with excel arrays. I wish to create a sheet from 2 seperate ranges. Below are the details. i am trying to create a report every week. Range 1 is in Sheet1: Columns("A:C"). the data in these columns may increase or decrease every week. Range 2...

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
Back
Top