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: 83
Default Code that sort of works

Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Unprotect Password:="******"
ws.Columns("A:W").AutoFit

Dim iLastrow As Integer
'This is your last row in col a
iLastrow = Range("A910").End(xlUp).Row
For i = 30 To iLastrow
If Cells(i, 1).Value = "" And Cells(i, 1).EntireRow.Hidden = False Then
Cells(i, 1).EntireRow.Hidden = True
End If
Next i

Next ws

I've got 12 sheets. Sheet 1 works with the exception of the last 5 rows
(they do not get hidden), and sheets 2-12 have formula's that simply do
this...
=IF(January!A395="","",January!A395)

What am I missing/doing wrong?

Thanks

 
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
Sort works in 2003 but not in 2000 Gleam Excel Programming 4 October 15th 07 09:30 PM
It works but I need better code... [email protected] Excel Programming 6 April 10th 07 01:29 PM
sort macro that works after leaving worksheet garyablett Excel Discussion (Misc queries) 1 May 5th 06 07:07 AM
Code works for any WBK except the PMW Mark Tangard[_3_] Excel Programming 3 July 17th 05 11:54 AM
Why won't this code works ksnapp[_37_] Excel Programming 6 April 1st 04 01:44 PM


All times are GMT +1. The time now is 06:21 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"