+ Reply to Thread
Results 1 to 2 of 2

Will an Array speed this up?

  1. #1
    Registered User
    Join Date
    03-03-2005
    Posts
    1

    Will an Array speed this up?

    Hello,

    I'm basically teaching myself VB programming as I go here. Basically I have a sheet that has information organized like this:

    Column A:
    MF 5-6
    T
    T
    T
    T
    MF 6-7
    T
    T
    etc...

    Column B:
    (Blank)
    AAA
    BBB
    CCC
    DDD
    (Blank)
    AAA
    BBB
    etc...

    What I'm trying to do is concatenate the non "T" cells from column A with the non blank cells from column B so i'll have something like:

    MF 5-6AAA
    MF 5-6BBB
    ...
    MF 6-7CCC
    MF 6-7DDD

    And so on. Currently my code goes one by one and puts them all together which takes it quite a while and this is something I run often. I was thinking maybe an array would help where I could have:

    Array 1:
    MF 5-6
    MF 6-7

    Array 2:
    AAA
    BBB
    CCC
    DDD

    And somehow put them together. The number of values in each set can change. Unfortunately I'm getting stuck at the point of populating the array based on the range of cells. I've done a bit of searching and can't find out how to do this.

    The reason for doing this is to setup a series of names that I can define and refer to each row for populating charts.

    Any help would be greatly appreciated on how I can speed this up.

    Thanks!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Mase,

    As you are finding out VBA is quite an extensive language. Since you are new to this language, and I mean no disrespect when I say, your code is most likely the problem. Writing code that is both fast and efficent requires an in depth understanding of the language. The forum is a great resource for learning. If you post the code you have written so far, the forum members can help point you in the right direction a lot faster. Also, it helps to provide some information about your system. What operating system are you running? What version of Excel? All this helps everyone to better understand your needs.

    Sincerely,
    Leith Ross

+ 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