none
How to remove hidden rows in excel sheet 2016 RRS feed

  • Question

  • Hi ,

    How to remove hidden rows and columns in excel, please give me some notes and answer.

    Friday, February 28, 2020 7:14 AM

All replies

  • For example, in order to delete the row 7 from active sheet, try this code:

     

       Dim ws As Worksheet

       Set ws = ActiveSheet

       Dim r As Range

       Set r = ws.Rows(7)

       r.Delete xlShiftUp

     

    This example assumes that you know the index of the row to be deleted.


    • Edited by Viorel_MVP Friday, February 28, 2020 4:56 PM
    Friday, February 28, 2020 4:56 PM