• Blog
  • Excel Downloads
    • Audit Tickmark Toolbar
  • Courses
    • Power BI
  • Contact
  • Checkout

Excel Zoom

...because it's more than just a calculator


Delete Hidden Rows and Columns

February 10, 2009 by Mark Leave a Comment

Sometimes we hide certain rows or columns because we don’t want the data to print, or just to get it out of the way. Other times though we simply don’t want to share the data in a hidden row or column. Assuming that the data in visible cells isn’t dependent on the data in hidden cells (i.e. if a formula references a hidden cell), we can use the macro below to automatically delete any hidden rows and columns in the active worksheet.

If you only want the hidden rows to be deleted, remove the three lines starting with For Ip = 256 through Next. To only delete the hidden columns, remove the next three lines starting with For lp = 65536 through Next.

Copy all of the code below. Paste it into your workbook’s Visual Basic editor, either under a Microsoft Excel Object or Module.

Need help? Use our nifty guide to help figure out how to install and use your macros.

You must be logged in and have an active membership to view this content. Please register or login to continue.

Filed Under: Macros Tagged With: Delete, Hidden, Macros

Looking For More Help?

Contact us with any specific questions or feedback. We love to hear from you!

Recommend a new product and EARN! Contact us here for info

Need to level up your career? See our amazing Excel Courses here

Looking for the Excel Audit Tickmark Toolbar? Click Here, NOW ONLY $97!

Subscribe to our mailing list
  • Facebook
  • Twitter

Search this site…

Power BI Webinar
Power BI Course
Free Excel Dashboard Webinar

Copyright © 2025 · Magazine Pro Theme on Genesis Framework

Login Form

Lost your password?