• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • Last Modified:

how to I write a Macro in Excel to go to the first available row before copy and pasting

The title says it all..looking at a quick and easy code to make my cursor go to the first avilable row so that each time I copy and paste it will be below the previous copy and paste. thanks
0
vtahal17
Asked:
vtahal17
1 Solution
 
Saqib Husain, SyedEngineerCommented:
range("A" & rows.count).end(xlup).offset(1,0)

will point to the first blank row in column A below the last used row in column A
0
 
kgerbChief EngineerCommented:
This will give you the last row and the last data entry can be in any column.
lrow = Cells.Find("*", , xlValues, xlWhole, xlByColumns, xlPrevious).Offset(1).Row

Open in new window


Kyle
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Tackle projects and never again get stuck behind a technical roadblock.
Join Now