+ Reply to Thread
Results 1 to 8 of 8

Select rows until blank row

  1. #1
    Registered User
    Join Date
    12-02-2008
    Location
    Bucharest
    Posts
    7

    Select rows until blank row

    I need to select the cells from row 2 until a blank row is met.
    There is no specific range as I intend to insert these rows in another sheet.
    Any suggestions please?
    Last edited by SKhan; 12-15-2008 at 05:31 PM. Reason: solved

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    Please Login or Register  to view this content.
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    12-02-2008
    Location
    Bucharest
    Posts
    7
    It doesn't copy the whole row, it only copies the data from row 1 column A to all the columns from the other sheet.

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Change to

    Please Login or Register  to view this content.
    VBA Noob

  5. #5
    Registered User
    Join Date
    12-02-2008
    Location
    Bucharest
    Posts
    7
    now it copies and inserts row 25 although the first blank cell was A6

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    copies and inserts row 25
    My code doesn't insert anything?

    VBA Noob

  7. #7
    Registered User
    Join Date
    12-02-2008
    Location
    Bucharest
    Posts
    7
    just a blank row, as I said... row 25. I can't understand why... before I entered EntireRow it copied the selection from A1:A5 but now it always copies from A25.

    This is the code.
    If you create a History with Track Changes you can notice that before the text "History ends...." there is always a blank row.

    Please Login or Register  to view this content.
    Edit: stupid typo was to blame... I forgot to add :A to the Range selection.

    Please Login or Register  to view this content.
    My bad.. editing the issue solved now.
    Last edited by SKhan; 12-15-2008 at 05:31 PM.

  8. #8
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    By declaring the LastRow at the top then selecting the new sheet the LastRow will be that of the active sheet

    Try

    Please Login or Register  to view this content.
    VBA Noob

+ 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