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

Posted on 2011-10-17
Last Modified: 2013-11-05
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
Question by:vtahal17
    LVL 43

    Expert Comment

    by:Saqib Husain, Syed
    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
    LVL 12

    Accepted Solution

    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


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
    Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
    The viewer will learn how to back up with the free utility from runtime software, DriveImageXML using Windows 7. Download DriveImageXML from Open folder where it was saved: Start installation by double clicking the install scrip…
    This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now