Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
hide zeros | Excel Discussion (Misc queries) | |||
hide zeros on pivot table | Excel Worksheet Functions | |||
how do I hide zeros in a graphic? | Charts and Charting in Excel | |||
hide zeros & negatives for date formulas | Excel Discussion (Misc queries) | |||
is there a way to hide zeros in a line graph | Charts and Charting in Excel |