+ Reply to Thread
Results 1 to 5 of 5

Copy and Paste cells from Range with data

  1. #1
    Registered User
    Join Date
    12-16-2013
    Location
    Reading, England
    MS-Off Ver
    Excel 2007
    Posts
    34

    Copy and Paste cells from Range with data

    Please see attached sheet
    I need the command button on worksheet SLA Order to copy only the cells with data in them from the green cells above the button and paste them into worksheet SLA.
    But with each new customer a new worksheet is created from SLA Order with a new name based on what is in cell B4 on worksheet Home when button on that sheet is activated.
    So each new SLA Order worksheet will have a different number of cells filled in depending on customer order. The command button must copy only these cells and paste them into worksheet SLA directly below any previous cells pasted there.

    Can anyone give me a hand with this

    Cheers
    Attached Files Attached Files
    Last edited by rikk1965; 02-04-2014 at 05:45 AM.

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

    Re: Copy and Paste cells from Range with data

    Too many worksheets with SLA in them. I am thoroughly confused about what you want to go where and under what circumstances.

  3. #3
    Registered User
    Join Date
    12-16-2013
    Location
    Reading, England
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Copy and Paste cells from Range with data

    Sorry about the confusion. Ive re uploaded it.
    Goto Home and put type test into cell B4 and and hit New Order Command button. This has just created a new worksheet called 'test SLA Order'
    (SLA Order is my master sheet)
    Goto test SLA ORDER and fill in the first couple of rows from the drop down boxes and enter a quantity in the next cell.
    So what I need is for the command button on this worksheet to copy only the cells with anything in them from the green cells above and paste them into the
    worksheet Totals.
    When a new order is created there may be a different number of cells filled in on the newly created worksheet %%% SLA Order and again I need the command button on this worksheet to copy only the cells with anything in them from the green cells above and paste them into the
    worksheet Totals directly below the previously pasted cells.

    Is that any better?

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

    Re: Copy and Paste cells from Range with data

    Much clearer explanation. If you want the pasted formatting on the Totals sheet to be different from the SLA sheet let me know.


    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-16-2013
    Location
    Reading, England
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Copy and Paste cells from Range with data

    Hello
    The above code works great but I need it to work if there are occupied cells below the green cells.
    ive updated the sample spreadsheet

+ 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. Replies: 1
    Last Post: 01-16-2013, 05:36 AM
  2. Replies: 3
    Last Post: 11-20-2012, 02:25 PM
  3. Copy, Paste Cells in a range
    By rawdog2222 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2012, 12:13 PM
  4. Change range of cells within VBA macro and copy and paste to fixed cell range
    By Mannyny in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-20-2012, 11:51 AM
  5. Sub to Copy and Paste a Range of Cells
    By FrankB2050 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-07-2010, 09:39 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