+ Reply to Thread
Results 1 to 6 of 6

How to create dynamic CopyToRange in Excel VBA?

  1. #1
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    How to create dynamic CopyToRange in Excel VBA?

    Hi

    Today my question is "Is it possible to create a dynamic CopyToRange in advance filter in VBA like I have two macros here

    Please Login or Register  to view this content.
    Here is the other one which I want to edite
    Please Login or Register  to view this content.
    Now required is that the result of Macro2 should be pasted to the last empty row of the result of Macro1
    How can I change the line of code of Macro 2 (the bold line) to get the required results?

    Your help will be much appreciated as I am stuck with this situation.

    Best Regards
    Imran Bhatti
    Attached Files Attached Files
    Teach me Excel VBA

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: How to create dynamic CopyToRange in Excel VBA?

    Maybe

    Please Login or Register  to view this content.
    Cheers
    Leo

  3. #3
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: How to create dynamic CopyToRange in Excel VBA?

    Hello Leo it solved 50 % of the problem. Remaining problem is that the second result has also the headers which I don't want . The only way I found was to select the header row of the 2nd Macro and cleard its contents, select the remaining 2nd result ,cut it and paste one row up. is it possible in VBA? if yes how?...

    Best Regards
    Imran Bhatti

  4. #4
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: How to create dynamic CopyToRange in Excel VBA?

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: How to create dynamic CopyToRange in Excel VBA?

    Please Login or Register  to view this content.
    [/CODE]

  6. #6
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: How to create dynamic CopyToRange in Excel VBA?

    Perfect LeoTaxi...Perfect....worked like a charm....Thanks a lot...Long live ExcelForum and its Experts.

+ 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 Create Dynamic Userform
    By raw_geek in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-06-2015, 10:21 AM
  2. Advance Filter - define Dynamic CopyToRange below last row of existing data
    By pci1239 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-23-2015, 03:41 PM
  3. CopyToRange
    By laguna92651 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-15-2015, 03:10 AM
  4. Create Macro for dynamic set of rows in excel
    By pavanexcel in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-18-2014, 05:42 AM
  5. [SOLVED] Create a Dynamic Chart from an Excel Table
    By Elīna in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 07-29-2013, 12:45 PM
  6. create dynamic ddbox in excel with vb
    By john gault in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2006, 05:16 PM
  7. I want to be able to create a dynamic reference in excel, for exam
    By Lee in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-05-2006, 12:55 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