+ Reply to Thread
Results 1 to 3 of 3

Macro that pastes from one sheet to next available row in another sheet - range issues

  1. #1
    Registered User
    Join Date
    10-05-2012
    Location
    Longmont
    MS-Off Ver
    Excel 2010
    Posts
    30

    Macro that pastes from one sheet to next available row in another sheet - range issues

    This same issue has been addressed repeatedly in this forum. I'm not having any trouble with the simple copy and paste macro. I am, however, having problems defining my ranges in a simple way.

    I track my daily orders and the tips I get from those orders in a monthly sheet. I would like those daily entries to copy and paste to a sheet with running totals. I have attached an example:

    Tips example.xlsx

    What I can't get my code to do:
    -Copy only the cells containing values for each of the days in a given month.
    -Paste those values to the first blank row in the "Orders vs Tips" sheet.

    Any advice?

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Macro that pastes from one sheet to next available row in another sheet - range issues

    HI

    Here's a start. Make sure you are on your data sheet before running.

    Please Login or Register  to view this content.
    rylo

  3. #3
    Registered User
    Join Date
    10-05-2012
    Location
    Longmont
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Macro that pastes from one sheet to next available row in another sheet - range issues

    Hi Rylo,
    Thanks for the reply! That code worked great. Just as a learning opportunity for me, would you mind explaining what purpose the following line serves:

    Please Login or Register  to view this content.
    I'm set to Option Explicit by default (helps me track my mistakes), so should I declare firstadd as a String? Also, I have never used the Address property before and I was curious what it does and why you chose to use it here.

    Thanks again for your help.
    Cheers,

    -Nick

+ 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