myarray

  1. E

    Excel UDF referencing a variable on the worksheet

    I have a User Defined Function that I am using to handle thousands of calculations on multiple worksheets. My UDF loads an array of values from a named range on the worksheet to preform the calculation. My issue is that the values I am pointing to on the worksheet can be different on each...
  2. T

    Array type

    This is my data: 1 4 2 5 3 6 What is wrong with this? Dim MyArray() As Long MyArray() = Cells(1, 1).CurrentRegion.Value Seems to only work if MyArray is declared as a Variant. Thanks
  3. T

    Adding extra row to array

    I have some data on my worksheet a follows: a 1 a 2 b 3 b 4 I want something to sum the values according to the value in column a, ie I want a to return 3 and b to return 7. Dim MyArray() As Variant MyArray = Cells(1, 1).CurrentRegion.Value Dim Counter As...
  4. T

    Passing arrays

    According to Chip Pearson: http://www.cpearson.com/excel/passingandreturningarrays.htm arrays are ALWAYS passed ByRef. If you attempt to pass ByVal, you'll encounter a compilation error. Here is his code: Option Explicit Sub AAATest() Dim StaticArray(1 To 3) As Long Dim N As...
  5. T

    Array syntax

    Assume I have data from cells A1 to B2. This would read all of it into an array: Dim MyArray() As Variant MyArray = Cells(1,1).CurrentRegion.Value If I want the array to have 3 columns (Column C is currently blank because data only goes from A1 to B2), I could use this: Dim MyArray()...

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