LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Hide Zeros

Well, it will be just the same, except you will swap rows and columns like
this:

Sub HideColumnsWithZero()

Dim i As Long
Dim lRow As Long
Dim LC As Long

'last Column of data
LC = Cells(256).End(xlToLeft).Column

'row to look for zero's, in this case row 25
lRow = 25

Application.ScreenUpdating = False

For i = 1 To LC
If Cells(lRow, i) = 0 And _
Not IsEmpty(Cells(lRow, i)) Then
Cells(i).EntireColumn.Hidden = True
End If
Next

Application.ScreenUpdating = True

End Sub


RBS


"PaulOakley" wrote
in message ...

Ok, for example if e25=0, it hides column E, if f25=0 it hides column
F.....
if g25=1 it does not hide...


--
PaulOakley
------------------------------------------------------------------------
PaulOakley's Profile:
http://www.excelforum.com/member.php...o&userid=25103
View this thread: http://www.excelforum.com/showthread...hreadid=529131




 
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
hide zeros ralpha Excel Discussion (Misc queries) 2 February 10th 10 10:29 PM
hide zeros on pivot table Marcelo Excel Worksheet Functions 2 March 12th 08 07:19 PM
how do I hide zeros in a graphic? FLF Charts and Charting in Excel 4 February 7th 08 08:47 PM
hide zeros & negatives for date formulas kimdnw Excel Discussion (Misc queries) 2 February 8th 06 07:34 PM
is there a way to hide zeros in a line graph L Young Charts and Charting in Excel 6 January 22nd 05 01:48 AM


All times are GMT +1. The time now is 04:04 PM.

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"