array in vba

  1. J

    Array Run time error

    I would appreciate knowing what I am doing wrong - could someone please point me in the right direction? I get a Run-time error 9 on the below code. if I replace x variable to a fix number in the line Cells(col, cy + 7) = Mycycle(x) to Cells(col, cy + 7) = Mycycle(1) it works but the cycles...
  2. G

    multidimensional arrays

    Hi all, I've got 2 related questions: (1) I am trying to define a two-dimensional array. The size of the array will vary somewhat, and each element of the array will have 3-5 subelements (overall, probably 75x5 max). Is there a way to build an array that flexes in size like that? Right now I'm...
  3. J

    Help with If statement / WorksheetFunction.Mode error

    When I try to run the macro containing the following code an "Application-defined or object-defined error" is generated Code: If Not IsNumeric(Application.WorksheetFunction.Mode(stock1)) Then stock1Mode = "No Mode" ElseIf IsNumeric(Application.WorksheetFunction.Mode(stock1)) Then stock1Mode...
  4. G

    Need to copy noncontiguous values from one sheet to a row on a second sheet like logging a check into a check register

    Dear All, I have an Excel 2003 workbook that is much like a checkbook. One sheet is the Form, which is protected except for cells where the user enters data (Payee, Amount, Date, etc.). I am looking for a macro that will copy data from certain noncontiguous cells on the Form sheet to another...
  5. M

    Converting arrays into UDFs

    Hi there - I'm a new member of the forum, and trying to get my head around transferring arrays into UDFs, so that I can invoke some functions instead of littering an excessively complex workbook with absurdly long arrays. For example, I’m trying to convert the following string (with declared...
  6. M

    activecell.entirerow.value2 problem

    Hi I am having problems with a value check. Basically: I have pulled data from a csv file into my workbook. During this cut'n'paste exersize I have found that some values are n/a. When this happens I want the value of the cell 4 to the right (on the same row) to replace the n/a. for example...
  7. KG Old Wolf

    Array as input to a Pivot Table

    I want to run multiple pivot tables off an array exceeding 500k cells. I believe it would vastly improve performance. I've tried variations of the code below to no avail. Set Pivot_Cache_01 = ActiveWorkbook.PivotCaches.Add _ (SourceType:=xlDatabase, _...
  8. W

    Array VBA issue

    Hi, I'm trying to make my code run faster by using a dynamic Array. However, I keep on getting an error everytime I run my code. The error is Object variableor with block variable not set. Where the error occurs is highlighted in red. Can someone help me out with this particular issue...
  9. G

    array in vba

    Hi all, i want to check unique records from specefic column and based on that criteria i want to paste all data from main sheet to other sheet. pls check the code below and help me to fix this problem. Private Sub test() Dim i As Integer Dim ClientName() As String ClientName...

Some videos you may like

This Week's Hot Topics

Top