+ Reply to Thread
Results 1 to 3 of 3

Macro to do same as "Go to Blanks" and "Delete Row"

Hybrid View

  1. #1
    Registered User
    Join Date
    02-19-2008
    Posts
    52

    Macro to do same as "Go to Blanks" and "Delete Row"

    I'm new to macros and working on a macro to facilitate a function that usually is the following steps-

    (Sorry it's long! Short version at bottom of post!)
    1. Select row under last used row in excel sheet
    2. Shift+Ctrl+Down Arrow
    3. Edit > Go to (ctrl+g in '97)
    4. Special
    5. Blanks
    6. [OK]
    7. Edit > Delete
    8. "Delete Entire Row"

    Can anyone give me some keywords, advice, or solutions to do the above in macro form?

    Short Version-
    1. Select all rows under last used cell
    2. Excel UI "Go to" Blanks (whatever that does...)
    3. Delete selected rows

    Thanks!
    Last edited by Luminary Xion; 02-06-2009 at 12:57 AM.

  2. #2
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Re: Macro to do same as "Go to Blanks" and "Delete Row"

    Hi

    A good starting point is the macro recorder, which will give you a basis to work from. Assuming you start in A1 then the following code from the macro recorder applies.

    Range("A1").Select
        Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
        Selection.SpecialCells(xlCellTypeBlanks).Select
        Selection.EntireRow.Delete
    From this you should be able to make any necessary changes.

    Regards

    Jeff

  3. #3
    Registered User
    Join Date
    02-19-2008
    Posts
    52

    Re: Macro to do same as "Go to Blanks" and "Delete Row"

    The Macro recorder was a great idea!

    Thanks so much for your help.

+ 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