LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Find Hidden rows and delete

I was given a macro by Sandy here which is not working exactly the way I
need. I need to be able to seek out first all rows that are Hidden and have
them deleted. When a row is deleted, the unhidden rows should move up. Then
I need the macro to look for hidden columns and do the same.

Issue with this macro: Since this is an mcell reference, it is only
deleting cells, I need entire rows, then columns deleted.
***
Sub FindHiddenAndLock()
Dim mcell, MyRange As Range
Set MyRange = Range("A1:A10")
For Each mcell In MyRange
If mcell.Rows.Hidden = True Then
mcell.Rows.Delete
End If
Next
End Sub
***

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find last row with hidden rows Sherry Excel Discussion (Misc queries) 2 October 13th 08 08:01 PM
How can I delete Excel rows that I've hidden without restoring the Ian@DSL Excel Discussion (Misc queries) 2 September 12th 07 08:51 PM
how do I delete hidden rows or columns without doing it manually? Eastman22 Excel Worksheet Functions 1 June 18th 07 04:52 PM
How do I delete hidden records/rows? Melissa M Excel Discussion (Misc queries) 2 June 8th 07 06:27 PM
subtotal copy-paste and delete hidden rows Winslow Excel Discussion (Misc queries) 1 December 12th 06 03:26 PM


All times are GMT +1. The time now is 07:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"