+ Reply to Thread
Results 1 to 4 of 4

Copy Data Macro - Autoadjust matrix size?

  1. #1
    Registered User
    Join Date
    08-08-2005
    Posts
    76

    Copy Data Macro - Autoadjust matrix size?

    I'm trying to use Excel to create a Macro to copy a table of data that has a preset column (A:G) size but varying number of rows (R2: RXXX, variable amount of data).

    These matrix of data is to be copied into another custom windows database program that will not except empty rows - hence in my Macro code, I am trying to be able to copy the every changing size matrix.

    ie. If I have ten lines of data to copy, I can specify the Macro to copy A2:G11 matrix. But if there are twenty lines of data, it has to copy a different size matrix A2:G21.

    Is it possible to get excel to report a particular matrix size in some way such that it can be used in a simple Macro?
    Last edited by heatwave; 03-23-2011 at 07:00 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Copy Data Macro - Autoadjust matrix size?

    Hi heatwave
    one possible way
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    08-08-2005
    Posts
    76

    Re: Copy Data Macro - Autoadjust matrix size?

    Quote Originally Posted by pike View Post
    Hi heatwave
    one possible way
    Please Login or Register  to view this content.
    Thank you Pike - that worked a treat!

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Copy Data Macro - Autoadjust matrix size?

    No problem

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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