none
VBA code copy and paste to the next blank cell RRS feed

  • Question

  • Dear VBA delvelopers!

    Appreciate your help in advance. Will need to update code below. What it is doing is that it copies data from a workbook
    then pastes it to another workbook which is a masterfile each time quote is created. It copies
    the following data then pastes into the next available row. 

    The code below does not work since it always pastes on the 2nd row/cell. 

    copyrow.Sheets("Outbound Quote").Range("strQuote").Copy
    pasterow.Sheets("Quote mastersheet").Range("A2").PasteSpecial xlPasteValues             'should paste to the next available row


    Tuesday, July 17, 2018 11:45 PM

Answers

  • copyrow.Sheets("Outbound Quote").Range("strQuote").Copy
    With pasterow.Sheets("Quote mastersheet")
        .Range("A" & .Rows.Count).End(xlUp).Offset(1),PasteSpecial xlPasteValues
    End With


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by IamJackie Wednesday, July 18, 2018 4:36 PM
    Wednesday, July 18, 2018 8:06 AM

All replies

  • copyrow.Sheets("Outbound Quote").Range("strQuote").Copy
    With pasterow.Sheets("Quote mastersheet")
        .Range("A" & .Rows.Count).End(xlUp).Offset(1),PasteSpecial xlPasteValues
    End With


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by IamJackie Wednesday, July 18, 2018 4:36 PM
    Wednesday, July 18, 2018 8:06 AM
  • Thank you so very much! Worked perfectly! :D 
    Wednesday, July 18, 2018 4:36 PM