+ Reply to Thread
Results 1 to 4 of 4

Auto Copy & Paste Range Based on Criteria

  1. #1
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Auto Copy & Paste Range Based on Criteria

    Using the attached, can you help me write code that "says":

    IF cell H2 = 1 than copy the "testrange" and paste it in the first blank column starting with column B on the "Sum" sheet (lined up with rows 5 to 28). So the first time the macro is run, it would paste the aforementioned range in B5:B28....the next in C5:C28.....and so on....

    Any help would be much appreciated, and please let me know if you require additional details. I would preferably like to be able to hide the "Sheet with Ran" sheet and still have this work.

    Thanks again,

    JD
    Attached Files Attached Files
    Last edited by dreicer_Jarr; 02-28-2012 at 04:17 PM.
    ______________________________________
    "Vision without Execution is a Hallucination"
    Edison

  2. #2
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Re: Auto Copy & Paste Range Based on Criteria

    Here is an attempt that gets close but does not do what I want. I want something similar to the code below only the paste should not always go in column B on the "sum" sheet. I am looking for the macro to look for the first available blank column after A and the paste should go five rows down. I am hoping this may help clarify my issue. Let me know, and thanks!


    Please Login or Register  to view this content.
    Last edited by dreicer_Jarr; 02-28-2012 at 01:52 PM.

  3. #3
    Forum Contributor
    Join Date
    02-07-2012
    Location
    MIA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    429

    Re: Auto Copy & Paste Range Based on Criteria

    Try this one.

    Please Login or Register  to view this content.
    I hope that helps.

    Oh just a heads up, it will paste your info after the last column that isn't empty on line 5. In your example F5 wasn't empty, so it would paste the info after that one. If you delete it tho, it will paste it on B5 as you wanted.
    Last edited by Pichingualas; 02-28-2012 at 03:06 PM.

  4. #4
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Re: Auto Copy & Paste Range Based on Criteria

    Absolutly perfect! Thank you!

+ 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