+ Reply to Thread
Results 1 to 2 of 2

VBA to copy and paste only cells in range with data

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

    VBA to copy and paste only cells in range with data

    Can anyone help me with this.

    Please look at the workbook attached. What I need the command button on worksheet 'SLA Order' to do is the following:
    Copy only rows with data in them from columns A:C and paste them into the worksheet 'Totals'
    If I add more rows of data in the worksheet 'SLA Order' and hit the command button it will again copy only rows with data in them from columns A:C and paste them into the worksheet 'Totals' but it must copy it must paste them directly below the previous pasted cells
    i.e. there are 2 line of data. I hit the command button and then add 3 lines of data to the 2 lines of data and hit the command button. There should now be 7 lines of data in the the Totals worksheet with no gaps
    Also I have created a named range of the area from which I wish to copy called Order

    Does this make any sense
    Please Help.. I'm really struggling with this one
    Attached Files Attached Files

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA to copy and paste only cells in range with data

    Hi rikk1965

    The Cells you're looking at are not Constants, they're Formulas
    Please Login or Register  to view this content.
    If you wish to look at Constants I'd suggest the Code would be
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ 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. Copy and paste cells from range
    By rikk1965 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-04-2014, 05:54 PM
  2. Copy and Paste cells from Range with data
    By rikk1965 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-04-2014, 05:50 AM
  3. Replies: 1
    Last Post: 01-16-2013, 05:36 AM
  4. Replies: 3
    Last Post: 11-20-2012, 02:25 PM
  5. 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

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