variant array

  1. P

    Variant-type object array element is deallocated by With statement

    If an object-array is declared as a Variant type (in order to easily check whether it is initialized using the IsEmpty function) then, if the subsequently defined array's elements are referenced as the object-expression of a With statement (e.g. "With VariantObjArray(i) ...") then that...
  2. 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...
  3. G

    Variant Array - Last Row and Placement

    Hi folks, Yet another thing I seem to be stuck on. Code and mini-sheet below to illustrate what I'm trying to do. Issue: I have an input array that is not always a fixed size. I would like to do some match on the items in that array and write out the result below the previous array with a...
  4. dreen

    Increasing the speed of Index & Match in VBA

    My code works and executes exactly what I need it to do, but I would like to improve it's processing time as updating each individual cell is significantly slowing down my macro. Currently, I am using VBA to do an Index & Match formula with another workbook where it retrieves information...
  5. M

    Referencing a worksheet using variable name from array

    Hello, I am new to the forum and a relatively new beginning VBA programmer in Excel. I have done a lot of looking through various forums and thought I found some code that I could adapt to a project I am working on. The code I am looking for will loop through an array of worksheets and perform...
  6. A

    Type Mismatch

    Hi there. I am an occasional VBA programmer and have run into a type mismatch problem that has me stumped. I am using the ancient 2007 edition of Excel (not my choice) and the following code in my macro works: Set rngCohort = wsScrap.Range("A1:A" & lngScrapLast) varCohort = rngCohort.Value...
  7. J

    Add an extra row to a variant

    Hello, I have created the below code too populate a userform list box. However I am having problems adding a extra row. Function Populate_Listbox_Worksheet() As Variant Dim vaData As Variant nrow = Sheet9.Range("A1048576").End(xlUp).Row If nrow < Range("ProjName").Row + 1 Then vaData =...
  8. E

    Variable Array based on cell value

    Hello, everybody. The following code shows an array with fixed size, with 6 values. What should i do to make its size depends on a cell value? For example, from 1 to 10? Dim MySlideArray As Variant Dim MyRangeArray As Variant 'List of PPT Slides to Paste to MySlideArray...
  9. P

    Assigning the text value of a range to a variant

    Hello, i am wondering if it is possible to assign the text value of a range to a variant. So normally as shown below Dim v as variant v = Range("A1:B100").Value2 However, if I have dates or times in the range, and would like to assign the values with their formats to the variant array. Any...
  10. M

    variants and arrays

    Hello, I am trying to loop through sheets and combine columns of data into a variant dim sSheet(3) as string dim mgTickers() as variant dim x as integer Do Sheets(sSheet(x)).Select 'variant With ActiveSheet mgTickers() = Range(.Cells(22, 1), .Cells(.Rows.Count, 1).End(xlDown)).Value...
  11. A

    VBA Variant Arrays help.

    Hi All, I have following returning Run-time Error type 13. Type mismatch. I don't understand why? dim WFMBlock1 as string dim WFMDR1 as variant dim Block1S , Block1E as long Block1S=2 Block1E=19 WFMBlock1 = ActiveWorkbook.ActiveSheet.Range(Cells(5, Block1S), Cells(36, Block1E)).Address...
  12. T

    Variant Array

    Hello! I’m a rookie VBA user and am having difficulties with a project.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p> <o:p></o:p> I have 3 worksheets in the same workbook entitled:<o:p></o:p> data <o:p></o:p> equipment<o:p></o:p> station<o:p></o:p> In...

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