can sumbody help me??speed up macro using array

I have to do a project which required me to get specific data from a large excel doc. i use filtering function but it takes me about 20 minutes to come out with the result. I know we can do it using array, but i don't know how to do it. for example, i want a data from country : xxxx, account name : yyyy unit:zzzz revenue :1234, these data i have to paste it to another worksheet, now i'm using macro and it is very slow. what i'm not rite now is juz record a macro, that's why it is slow. can sumbody help me to speed up my process?i'm am more than happy to receive your help.

thanks
lavenderial

Comments

  • Um, I'm a little unclear on what you need, but this might get you started.

    public type account
    name as string
    country as string
    unit as string*3
    revenue as double
    end type

    dim bank() as account
    redim bank(int_numberofaccounts)
    for x=1 to ubound(bank)
    'get data
    bank(x).name=names
    bank(x).country=country
    '...
    next x

    type can not be in a sub. the for loop obviously does.

    : I have to do a project which required me to get specific data from a
    : large excel doc. i use filtering function but it takes me about 20
    : minutes to come out with the result. I know we can do it using
    : array, but i don't know how to do it. for example, i want a data
    : from country : xxxx, account name : yyyy unit:zzzz revenue :1234,
    : these data i have to paste it to another worksheet, now i'm using
    : macro and it is very slow. what i'm not rite now is juz record a
    : macro, that's why it is slow. can sumbody help me to speed up my
    : process?i'm am more than happy to receive your help.
    :
    : thanks
    : lavenderial
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion