+ Reply to Thread
Results 1 to 6 of 6

IsEmpty

  1. #1
    Registered User
    Join Date
    02-04-2007
    Posts
    15

    IsEmpty

    Please Help!
    Can I select a group of rows starting with a named cell and then selecting all rows until a row is empty?

    I think it goes somthing like this...

    Please Login or Register  to view this content.
    .....until r IsEmpty

    Selection.Copy
    Last edited by VBA Noob; 02-05-2007 at 02:28 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Determined,

    You were really close...

    Please Login or Register  to view this content.
    There is a possible problem. In this code I used column "A" to find the last row. Each column may not have the same number of non blank rows. You will need to select the column that will always have the most rows filled.

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    02-04-2007
    Posts
    15
    This is still capturing all rows that have data on my spreadsheet even though there is an empty row between the sets of data.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Determined,

    Sorry, I misunderstood your post. Will you be looking for an entire empty row or just an empty cell in a specific column? Let me know, I'll rewrite the macro.

    Sincerely,
    Leith Ross

  5. #5
    Registered User
    Join Date
    02-04-2007
    Posts
    15

    Smile

    I am looking for an entire empty row. Thank you for your help.

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Determined,

    This macro will select the ActiveCell to the last column in the UsedRange down to the row above the first empty row found. Checks are made to ensure the ActiveCell is not in a blank row or outside the UsedRange (Data area).

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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