+ Reply to Thread
Results 1 to 6 of 6

Pasting Data to Next Available Cell - Help Much Appreciated

  1. #1
    Registered User
    Join Date
    04-26-2013
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    2

    Question Pasting Data to Next Available Cell - Help Much Appreciated

    Hello, I am new to the forum and hoping someone can help me out. I am trying to iterate through an if statement and paste certain contents to another sheet - that part is working. However, I can't crack the code on printing to the next avaialble cells so that I don't overwrite my older data.

    Here's what I've got, which is throwing an error (object variable or with not set)

    Please Login or Register  to view this content.
    I am very new to VBA, so if I am missing an obvious convention, it's becasue I have no formal training. Thanks for your help!

    Sypris

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Pasting Data to Next Available Cell - Help Much Appreciated

    You are missing to initiate the loop MyLastRow

    Please Login or Register  to view this content.
    Last edited by AB33; 04-30-2013 at 11:08 AM.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Pasting Data to Next Available Cell - Help Much Appreciated

    Another way

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-26-2013
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Pasting Data to Next Available Cell - Help Much Appreciated

    AB33, thanks so much! The first solution was still throwing an exception for some reason, not sure why. But the second one worked perfectly for me. Thanks for your very quick reply. I spent two days trying to do this, I guess I should've posted here sooner!

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Pasting Data to Next Available Cell - Help Much Appreciated

    In which line do you get the error?

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Pasting Data to Next Available Cell - Help Much Appreciated

    Try use this line, instead

    Please Login or Register  to view this content.

+ 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