+ Reply to Thread
Results 1 to 6 of 6

Collect Data into Array and Transfer from One Sheet to Another based on variable

  1. #1
    Registered User
    Join Date
    02-23-2014
    Location
    Christchurch, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    9

    Collect Data into Array and Transfer from One Sheet to Another based on variable

    Hi All,

    I am new to VBA and have run into a piece of work that requires an array.

    Using VBA, I am wanting to achieve the following outcomes:

    1. Collect dynamic data (size ranges between 100 rows and 20,000 rows at any time) from sheet f where column I (labelled as NotPresented) is greater than 0 or is greater than "" (i.e. not blank cell) into an array of 9 columns
    2. Transfer the results of this array into a specific range (a21, b21, c21, and so forth) in sheet t

    I am sure there are many people whom have done this before so any help would be greatly appreciated.

    Thanks

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Collect Data into Array and Transfer from One Sheet to Another based on variable

    Unless I am missing something, why do you need an array? You have a condition in which column I is >0. A simple filter will do the job.

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Collect Data into Array and Transfer from One Sheet to Another based on variable

    Why use an array. Try this:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-23-2014
    Location
    Christchurch, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Collect Data into Array and Transfer from One Sheet to Another based on variable

    Hi guys. Thanks for the replies and help so far.
    In response to your suggestions, I specifically asked for help with using an array as I want to learn how to use this method in other areas of my project.
    I realise now based on your responses, that I do not need an array to facilitate my outcome, however, for the purpose of learning, I would like to receive assistance based on the original request.
    Thanks in advance.

  5. #5
    Registered User
    Join Date
    02-23-2014
    Location
    Christchurch, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Collect Data into Array and Transfer from One Sheet to Another based on variable

    Hi again. To construct this array, would I use ADO or DAO as the recordset model?

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Collect Data into Array and Transfer from One Sheet to Another based on variable

    ADO usually used to copy data from closed workbook. I do not know how it is relevant to your request.

+ 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] VBA code to automatically transfer data from one sheet to another based on dropdown
    By jadersantos in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-22-2013, 11:01 AM
  2. [SOLVED] Macro to transfer data as values to another sheet based on the result from a formula
    By bpiroma in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2012, 07:22 AM
  3. transfer pivottable collection to a variable array
    By sayeamans in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-06-2010, 05:20 AM
  4. Transfer Data To Different Sheet Based on Condition
    By Strugggler in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-27-2008, 08:42 PM
  5. Use button on sheet to transfer data based on todays date
    By Qaspec in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2005, 01:37 AM

Tags for this Thread

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