+ Reply to Thread
Results 1 to 5 of 5

Combine Multiple scripts into an array

  1. #1
    Registered User
    Join Date
    12-13-2013
    Location
    Stephens City, VA
    MS-Off Ver
    Excel 2010
    Posts
    24

    Combine Multiple scripts into an array

    I've finally got this code to work, however, it would be much more efficient in an array. This is where my problem lies, as I have not mastered the art of creating arrays and having them run correctly

    What I am trying to do is copy all names, without copying blanks or duplicates, from Column B (with Headers) in Sheets "Incident Data", "Change Data", and "Task Data" to Sheet "!" Column B and starting in Row 8.

    The code I am using does this effectively when run in a separate module, but when I put it in with the rest of my code it will copy to "!" B8, but the data from Change Data starts 7 rows below the last of Incident Data. Task Data appends to the end of the Change Data with no spaces between. If this issue can be resolved as well I would appreciate it!

    I can't attach a spreadsheet because it's on a closed network.

    Any help or advice is much appreciated.

    Thanks!

    Tim

    Please Login or Register  to view this content.
    Last edited by Thunderer; 01-31-2014 at 01:28 PM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Combine Multiple scripts into an array

    Your code can't work as you have posted it as it's riddled with typos.

    That said, in your lcNR line you are using the wrong offset - should be 0,1 rather than 7,1.

  3. #3
    Registered User
    Join Date
    12-13-2013
    Location
    Stephens City, VA
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Combine Multiple scripts into an array

    I see where I missed a quotation (which I've corrected), but other than that I don't see the typos you are referring to. It works well when I run it in a module by itself, but when I add it to a module with code already in it, it doesn't run correctly. It runs, but with 7 spaces between where the data from Incident Data sheet stops and Change Data starts.

    I set the offset to 7,1 to start copying to B8 in sheet "!".

    I appreciate the reply.

    Respectfully,

    Tim

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Combine Multiple scripts into an array

    E.g.
    Please Login or Register  to view this content.
    I assume you must have typed it out longhand? I think there is scope to simplify your code, but would help if you could mock up a workbook.

  5. #5
    Registered User
    Join Date
    12-13-2013
    Location
    Stephens City, VA
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Combine Multiple scripts into an array

    Thanks Stephen. I'll try to create a mock workbook and get it posted today or tomorrow. I had to type it long hand because the workbook and the internet are on two completely different networks and there is no way to get data from one to the other (it's a government thing )

    Thanks!

    Tim

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Excel VBA Code + Error when trying to run multiple scripts in one work sheet.
    By blckhandsid3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-06-2013, 05:27 PM
  2. Replies: 3
    Last Post: 08-07-2011, 06:52 AM
  3. Combine 3 scripts into 1
    By pauldaddyadams in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-21-2009, 06:14 AM
  4. For a website, are Excel scripts better than other programming language scripts?
    By Advice Pro in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-01-2009, 02:07 PM
  5. Replies: 1
    Last Post: 08-25-2005, 03:43 AM

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