Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Paste" At Next Cell? 1

Status
Not open for further replies.

TonyRosen

Programmer
Jul 28, 2003
108
US
I have a workbook that I'm opening and copying a worksheet out of ...

I have a workbook that I'm pasting that information into ...

If the next available Row is row 9, how do I get the VBA to search for "row 10" (in this instance, it changes constantly) and paste into the workbook starting at Row 10?

In other words, I want to paste the new data at the end of existing data ...
 
There are a number of ways to find the last used row (if you search the forum you will find that it is a question asked/answered often - there's even a FAQ about it). I like:
Code:
Dim LastRow As Integer
LastRow = ActiveSheet.Cells.Find(what:="*", after:=Range("IV65536"), _
    searchorder:=xlByRows, searchdirection:=xlPrevious).Row
Range("A" & LastRow + 1).PasteSpecial (xlPasteAll)
Hope that's helpful!

VBAjedi [swords]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top