+ Reply to Thread
Results 1 to 4 of 4

Finding and selecting first empty row

  1. #1
    Registered User
    Join Date
    12-23-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    5

    Finding and selecting first empty row

    Hi guys,

    I'm pretty new to this, so this might be a ridiculously simple question, but I've been trying to write a macro that will take a few cells from one sheet, and paste into the first empty row in a master sheet in the same workbook. From other recommendations, this is what I have so far:

    Please Login or Register  to view this content.
    The problem is that, well, it doesn't work! I read that other people have used the Cells(Rows.Count, 1).End(xlUp). Offset(1).Select to get the first empty row, but it doesn't seem to be working for me. Can anyone point me in the direction of a solution? It'd be greatly appreciated
    Last edited by thecaitfish; 01-10-2014 at 06:17 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,433

    Re: Finding and selecting first empty row

    The code works fine. I suspect that it just isn't doing what you think it is.

    Please Login or Register  to view this content.
    From whatever is the current (active) cell, move across 4 cells and select 5 cells on the same row


    Please Login or Register  to view this content.
    copy the selected cells


    Please Login or Register  to view this content.
    select the CAPA Index sheet


    Please Login or Register  to view this content.
    go to the bottom of column 1 and go up to the last non-blank cell, then go down one row and across 2 columns and select the cell


    Please Login or Register  to view this content.
    paste the copied data.



    It works but it will depend on the starting point for the copy.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,433

    Re: Finding and selecting first empty row

    Note that the code could be replaced with this:

    Please Login or Register  to view this content.

    Regards, TMS

  4. #4
    Registered User
    Join Date
    12-23-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Finding and selecting first empty row

    Ah yep, that was definitely me being a spanner - the problem was that people weren't filling in the first few columns after they'd run the macro, so the first column was still blank, thanks!

+ 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. Empty a textbox when selecting it
    By pjardino in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-28-2008, 10:32 AM
  2. Selecting first empty row in column
    By cbh35711 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2006, 11:02 AM
  3. [SOLVED] Finding next empty empty cell in a range of columns
    By UncleBun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-13-2006, 07:25 PM
  4. Selecting the first empty row
    By webba in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-04-2005, 09:49 AM
  5. Re: Selecting the first empty row
    By KC Cheung in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-13-2005, 09:05 AM

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