+ Reply to Thread
Results 1 to 17 of 17

Remove blank rows

  1. #1
    Registered User
    Join Date
    08-30-2010
    Location
    DC
    MS-Off Ver
    Excel 2003
    Posts
    9

    Remove blank rows

    Hi

    I do not know how to use macro. I am tired to delete the blank rows manually each month.

    Please make my days easier if you know how I can go about remove the blank rows on the attached file. I have used F5 but it is not friendly

    If I have to use macro - can you give me the baby step-by-step and the codes pls

    Thank you all!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: How to remove blank rows

    Please post in the correct forum in the future. I will move it for you this time.

    Please have a look at our forum rules.

  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,422

    Re: How to remove blank rows

    Put this code in a normal code module:

    Please Login or Register  to view this content.

    Regards
    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


  4. #4
    Registered User
    Join Date
    08-30-2010
    Location
    DC
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: How to remove blank rows

    Am so sorry.. I have never used macros before.. how do I go about using the code you provided?

    can I email you the file to help?

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: How to remove blank rows

    I have placed the macro in your sample file. It is named Macro1

    Here are instructions for running it:

    http://spreadsheets.about.com/od/adv...el_macro_5.htm
    Attached Files Attached Files

  6. #6
    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,422

    Re: How to remove blank rows

    @Cutter: thanks

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Smile Re: How to remove blank rows

    You're welcome. I did it because your green light was out.

  8. #8
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,521

    Re: How to remove blank rows

    I would replace

    Please Login or Register  to view this content.
    with

    Please Login or Register  to view this content.
    Also, add Application.ScreenUpdating = False at the beginning of the code and Application.ScreenUpdating = True at the end.

    The code would look like this

    Please Login or Register  to view this content.
    Not nitpicking, just observing.

    John

  9. #9
    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,422

    Re: Remove blank rows

    @jolivanes: fair observation ... perhaps being just a little bit lazy, although I did tidy up the recorded macro

  10. #10
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,521

    Re: Remove blank rows

    Might be that "lazy" is the wrong word.
    You could be busy and I have time on hand.

  11. #11
    Registered User
    Join Date
    08-30-2010
    Location
    DC
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Remove blank rows

    Hi

    Thank you for all the help. I am still stuck

    I do get the following error message

    RUN-TIME ERROR '1004'
    AUTOFILTER METHOD OF RANGE CLASS FAILED

    Can I email the file am working on to someone who can help.. please

  12. #12
    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,422

    Re: Remove blank rows

    Is the worksheet protected?

    How different is the real file from the sample you have posted?

    Regards

  13. #13
    Registered User
    Join Date
    08-30-2010
    Location
    DC
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Remove blank rows

    no its is not protected

  14. #14
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,521

    Re: Remove blank rows

    Does this attached workbook work on your computer?
    Attached Files Attached Files
    Last edited by jolivanes; 03-07-2011 at 06:09 PM. Reason: fix spelling

  15. #15
    Registered User
    Join Date
    08-30-2010
    Location
    DC
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Remove blank rows

    I am about to give up... i try to attach the whole file but the MB on myfile wont allow me

    if one can help pls.. let me email u

  16. #16
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,521

    Re: Remove blank rows

    JohnsonBeGood.
    Did you get it working?
    If so, what was your solution? I'm always learning and would like to know how the problem was solved.
    Thanks and Regards
    John

  17. #17
    Registered User
    Join Date
    08-30-2010
    Location
    DC
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Remove blank rows

    Sorry.. I was running close to the deadline so I had to email our IT dept to assist and give me the completed file.

    I am not sure what they did. Thanks

+ 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