+ Reply to Thread
Results 1 to 21 of 21

Help with copy past to last used row +1

  1. #1
    Registered User
    Join Date
    07-07-2015
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    42

    Help with copy past to last used row +1

    Hi Everybody, I need to copy a specific row on 1 worksheet and paste to another. It must find last used row +1 (so it skips a row when pasting)
    This is what I have now and it does not work.....

    Please Login or Register  to view this content.
    I need it to copy Range "A6:V6" on first worksheet and paste, finding the last used row then skip a row, on 2nd worksheet.
    Last used row will be in column B
    Last edited by Pat1009; 07-11-2015 at 11:17 AM.

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Help with copy past to last used row +1

    something like this
    Please Login or Register  to view this content.

  3. #3
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Help with copy past to last used row +1

    Maybe this....
    Please Login or Register  to view this content.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  4. #4
    Registered User
    Join Date
    07-07-2015
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    42

    Re: Help with copy past to last used row +1

    It does now copy/paste, but it starts pasting in Column C not B and it does not skip a row before pasting.
    I need it to find last used row, then leave a blank row, then paste.
    Last edited by Pat1009; 07-11-2015 at 12:26 PM.

  5. #5
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Help with copy past to last used row +1

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    07-07-2015
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    42

    Re: Help with copy past to last used row +1

    that worked for leaving the blank row but it still pastes, starting in column C instead of B.
    Last edited by Pat1009; 07-11-2015 at 12:13 PM.

  7. #7
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Help with copy past to last used row +1

    It should paste in Column B...check if maybe your first cell i.e. A6 maybe blank....
    If not, then kindly upload your workbook....
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  8. #8
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Help with copy past to last used row +1

    Hi Pat1009,
    Could you please attach an example of a file, where it still pastes, starting in column C instead of B

  9. #9
    Registered User
    Join Date
    07-07-2015
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    42

    Re: Help with copy past to last used row +1

    ok, I will

  10. #10
    Registered User
    Join Date
    07-07-2015
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    42

    Re: Help with copy past to last used row +1

    For some reason it will not let me post it using HTML Maker
    Last edited by Pat1009; 07-11-2015 at 12:29 PM.

  11. #11
    Registered User
    Join Date
    07-07-2015
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    42

    Re: Help with copy past to last used row +1

    For some reason it will not let me post it. I don't know if this matters, but on sheet 2 column A is blank except for A1
    Last edited by Pat1009; 07-11-2015 at 12:30 PM.

  12. #12
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Help with copy past to last used row +1

    For uploading the workbook, you need to click on "Go Advanced" button at the foot of the typing area and then clicking on the "Paper Clip" icon from the tools above...

  13. #13
    Registered User
    Join Date
    07-07-2015
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    42

    Re: Help with copy past to last used row +1

    Ok, it is attached, Run Module # 4 in the VBA Editor, then look at the Sheet names Exceeds, at the bottom

  14. #14
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Help with copy past to last used row +1

    I told you you would be having A6 as blank...
    So just change the Offset code to-
    Offset(2, -1)

  15. #15
    Registered User
    Join Date
    07-07-2015
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    42

    Re: Help with copy past to last used row +1

    Beautiful, this works, thank you Sourabhg98 and to you too Nilem

  16. #16
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Help with copy past to last used row +1

    Glad to know that worked!!
    If your query is solved, kindly mark this thread as solved from the "Thread Tools" at the top of this page..

  17. #17
    Registered User
    Join Date
    07-07-2015
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    42

    Re: Help with copy past to last used row +1

    Sour, do you think you can help me with another problem I am having with this code?
    Please Login or Register  to view this content.
    Instead of telling it to Paste on Pasterow =3, I need it to find the last used row and paste right below it. You can find it in module #2 of my posted workbook

  18. #18
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Help with copy past to last used row +1

    Not sure what you need...
    But try this-
    Change this---
    If ws2.Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).row > pasteRow Then pasteRow = ws2.Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).row
    to
    If ws2.Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).row > pasteRow Then pasteRow = ws2.Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).row + 1
    or
    If ws2.Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).row > pasteRow Then pasteRow = ws2.Cells(Rows.Count, 2).End(xlUp).Offset(2, 0).row

  19. #19
    Registered User
    Join Date
    07-07-2015
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    42

    Re: Help with copy past to last used row +1

    that did not work, it only created an empty row between each row of data.
    This part is what I am talking about.....
    This is a better example of what I need changed
    If ws1.Cells(i, 4) = "A" And ws1.Cells(i, 12) > 72 And ws1.Cells(i, 12) < 240 And ws1.Cells(i, 14) = "Standard" Then
    pasteRow = 23

    I believe I am telling it to Paste, starting on Row 23, I want to tell it to paste after the last row used, because the date that it finds will change monthly

  20. #20
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Help with copy past to last used row +1

    So instead of 23 you want it to say the last row??
    Then use this
    pasteRow = ws2.Cells(Rows.Count, 2).End(xlUp).Offset(2, 0).row

    This would give in this case pasterow = 42

  21. #21
    Registered User
    Join Date
    07-07-2015
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    42

    Re: Help with copy past to last used row +1

    This also did not do it. But, if you look at the worksheet names "Tony Exceeds SLO Comments" (right next to the "Exceeds" worksheet).
    What I am trying to do is make the "Exceeds" worksheet look exactly like the other worksheet, but have VBA do it in Module #2. Feel free to create a new module, if you want to help me.
    The data is coming from the "All Restoration Cases" worksheet. (this is the raw data).

+ 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 past
    By kuzna26 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-02-2014, 12:15 PM
  2. [SOLVED] need help with copy past vba
    By K-Ching in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-18-2014, 01:16 PM
  3. Copy and Past
    By skate1991 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2012, 09:56 AM
  4. I need to keep tabulation during copy/past
    By jonat2 in forum Excel General
    Replies: 0
    Last Post: 05-02-2008, 02:54 PM
  5. [SOLVED] Copy and Past
    By Joe in forum Excel General
    Replies: 1
    Last Post: 08-16-2006, 09:10 PM

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