+ Reply to Thread
Results 1 to 10 of 10

How to delete blank rows in cell lock sheet

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    02-04-2017
    Location
    chennai
    MS-Off Ver
    MS OFFICE 365
    Posts
    440

    How to delete blank rows in cell lock sheet

    I am using excel. Daly I am creating new sheet on the date. Using lot of formula. so i am using cell Protect in my sheet. When its protect I not able to delete the rows. So please help someone to tell me how we can delete the rows with protect sheets
    Attached Files Attached Files

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,050

    Re: How to delete blank rows in cell lock sheet

    Try:
    Sub DeleteRows()
       Sub DeleteRows()
        Application.ScreenUpdating = False
        ActiveSheet.Unprotect
        Dim LastRow As Long, LastCell As Long
        LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row + 1
        LastCell = Range("A1").SpecialCells(xlLastCell).Row
        Rows(LastRow & ":" & LastCell).Delete
        ActiveSheet.Protect
        Application.ScreenUpdating = True
    End Sub
    Last edited by Mumps1; 12-03-2020 at 09:49 AM.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Valued Forum Contributor
    Join Date
    02-04-2017
    Location
    chennai
    MS-Off Ver
    MS OFFICE 365
    Posts
    440

    Re: How to delete blank rows in cell lock sheet

    Dear Mumps1,

    thanks for you are reply. macros not working please find the attachment
    Attached Files Attached Files

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,050

    Re: How to delete blank rows in cell lock sheet

    Try:
    Sub DeleteRows()
        Application.ScreenUpdating = False
        ActiveSheet.Unprotect
        Columns(1).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
        ActiveSheet.Protect
        Application.ScreenUpdating = True
    End Sub

  5. #5
    Valued Forum Contributor
    Join Date
    02-04-2017
    Location
    chennai
    MS-Off Ver
    MS OFFICE 365
    Posts
    440

    Re: How to delete blank rows in cell lock sheet

    Dear mumps,

    this working now, but i want delete only Columns a to q only active and delete. after s columns its some collusion is going so please fine the attachement and i will create a new sheets in Daily sheet name (on the date)
    Attached Files Attached Files
    Last edited by sudbhavani; 12-03-2020 at 10:15 AM.

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,050

    Re: How to delete blank rows in cell lock sheet

    Try:
    Sub DeleteRows()
        Application.ScreenUpdating = False
        ActiveSheet.Unprotect
        Columns(1).SpecialCells(xlCellTypeBlanks).Resize(, 17).Delete
        ActiveSheet.Protect
        Application.ScreenUpdating = True
    End Sub

  7. #7
    Valued Forum Contributor
    Join Date
    02-04-2017
    Location
    chennai
    MS-Off Ver
    MS OFFICE 365
    Posts
    440

    Re: How to delete blank rows in cell lock sheet

    Dear mumps,

    thanks a lot. but only one thing i not able create new sheet in the workbook.

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,050

    Re: How to delete blank rows in cell lock sheet

    You haven't explained the criteria for the creation of a new sheet. What would trigger the creation of the sheet, what is the name of the newly created sheet, what data would that sheet contain? Please clarify in detail and attach a file which contains a manually-created new sheet with the expected results.

  9. #9
    Valued Forum Contributor
    Join Date
    02-04-2017
    Location
    chennai
    MS-Off Ver
    MS OFFICE 365
    Posts
    440

    Re: How to delete blank rows in cell lock sheet

    Dear Mumps,

    i create daily sheet same format .create new sheets name(on that date). i attached same sheet
    Attached Files Attached Files

  10. #10
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,050

    Re: How to delete blank rows in cell lock sheet

    I'm sorry but I don't understand. Do you want to make a copy of Sheet1 and name it according to the current day's date? If so, do you want a new and separate macro to do this?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. To delete blank columns and rows in a different sheet
    By naveenhs5 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-27-2014, 04:21 PM
  2. Changing code from deleting rows to cut/paste rows into another sheet and delete blank row
    By kmarshall6576 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-18-2013, 01:54 AM
  3. [SOLVED] Excel 2007 : Blank Rows At Bottom of Sheet Will Not Delete
    By KSSLR in forum Excel General
    Replies: 3
    Last Post: 06-20-2012, 01:15 PM
  4. Replies: 1
    Last Post: 05-10-2012, 04:58 PM
  5. [SOLVED] To delete blank rows having blank cell in the needed raws
    By Alexander_Golinsky in forum Excel General
    Replies: 4
    Last Post: 05-04-2012, 03:11 PM
  6. delete all blank rows on a hidden sheet
    By FRIEL in forum Excel General
    Replies: 1
    Last Post: 09-10-2008, 12:32 PM
  7. [SOLVED] How can I Delete rows were the first cell is blank?
    By Mascot in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-25-2006, 12:05 PM

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