+ Reply to Thread
Results 1 to 5 of 5

How to speed up this macro? How to use an array?

  1. #1
    Registered User
    Join Date
    05-15-2012
    Location
    Prague
    MS-Off Ver
    Excel 2007
    Posts
    3

    How to speed up this macro? How to use an array?

    Hello everybody,

    I am trying to speed my macro a little bit, and I figured out that I can use array. But it's not working. Where is the issue?

    Please Login or Register  to view this content.
    The code without array is working OK, but very slow - 90 seconds:

    Please Login or Register  to view this content.
    Thanks for any help!

    Mario

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: How to speed up this macro? How to use an array?

    "not working" means...?

    this line
    Please Login or Register  to view this content.
    should be
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    05-15-2012
    Location
    Prague
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How to speed up this macro? How to use an array?

    The Macro is just NOT doing the job. I still have the "#NA", "NoRecords" etc. values in cells.

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: How to speed up this macro? How to use an array?

    Try something like this
    Please Login or Register  to view this content.
    instead of
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-15-2012
    Location
    Prague
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How to speed up this macro? How to use an array?

    Now I got type mismatch error at line:
    If ArrayA(Lrow, Lcol) = "#NA" Or ArrayA(Lrow, Lcol) = "NORecords" Then ArrayA(Lrow, Lcol - 1) = "": ArrayA(Lrow, Lcol) = "": ArrayA(Lrow, Lcol + 1) = ""
    When I put On Error Resume NExt

    Macro removes everything from an Array and I got empty cells

    Here goes the whole code:

    Please Login or Register  to view this content.
    Last edited by djvino; 05-15-2012 at 08:02 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1