LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Hide Columns On Condition

Sorry, forgot to put in the part about looping through months

If ActiveSheet.Name = "Main" Then
If Not Intersect(Target, Range("B3")) Is Nothing Then
For Each wsh In Sheets(Array _("Jan", "Feb", "Mar", "Apr", "May", _
"Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"))
For Each c In wsh.Range("D3:P3")
If c < Sheets("sheet1").Range("A2") Then
c.Columns.ColumnWidth = 0
Else
c.Columns.AutoFit
End If
Next
Next
End If
End If
End Sub

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
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 Rows If Condition True wilbursj Excel Worksheet Functions 2 April 20th 09 08:09 PM
How do I auto hide a row if a condition isnt met? Brian Excel Discussion (Misc queries) 1 April 3rd 09 09:32 PM
hide rows where cell condition is not met amaries Excel Worksheet Functions 1 January 9th 07 06:50 PM
How do I hide a combo_box on a condition? spannerj Excel Worksheet Functions 0 July 22nd 05 05:26 PM
Hide a row based on one cell's condition Brian Excel Worksheet Functions 1 March 19th 05 11:57 AM


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