+ Reply to Thread
Results 1 to 7 of 7

Code to delete all blank rows and add totals

  1. #1
    Registered User
    Join Date
    06-20-2011
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    91

    Code to delete all blank rows and add totals

    Hi...I'm not sure how easy this is but I have a template where data is copied to from another worksheet once calculations have been carried out.
    On this template there will be blank rows with no data in them as the number of rows could vary each time.
    I would like a code please do delete all the blank rows except the last row which has some calculations.
    I would also like to add totals to columns I and J.
    The data will start from Column/Row C17.

    Can anyone help with a code please?

    Thanks
    Last edited by fusion007; 06-24-2011 at 04:01 PM.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Code to delete all blank rows and add totals

    hi, please post sample workbook showing original data and result you need to get

  3. #3
    Registered User
    Join Date
    06-20-2011
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    91

    Re: Code to delete all blank rows and add totals

    Hi...please find attached sample workbook. You will see from the worksheet that I want to delete all rows between 31 and 121 but keep row 122 and add totals to columns I and J.
    Thanks
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Code to delete all blank rows and add totals

    please check attachment, run code "test"
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-20-2011
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    91

    Re: Code to delete all blank rows and add totals

    Works!!! Brilliant thanks so much. Will add reputation points for you.
    If you don't mind can you please explain to me how the code works for my future reference.

  6. #6
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Code to delete all blank rows and add totals

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-20-2011
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    91

    Re: Code to delete all blank rows and add totals

    Thanks watersev!

+ 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