hi there,
I am new to this forum but have already found it helpful!
Basically i have an excel file which is a template for entering in deals which can vary from 3-7 years. So I want to make it easier for the end user -by having the VBA hide colomns based upon if they are 0's i.e. if its a 5 year deal then the year 6 and year 7 wont show... etcetc. The file is about 20 sheets big and 15 of them are the same format just for differerent lines of business (these 15 are the ones i want to make more consise to the years that they represent)
Anyway thats my waffle over, here is my current code I am using:
Sheets(Array(ABOUT 15 SHEETS)).Select
Application.ScreenUpdating = False
For Each c In Range("C15:R15")
c.EntireColumn.Hidden = (c.Value = 0)
Next c
Application.ScreenUpdating = True
End Sub
Now the part I have highlighted in bold works fine and hides colomns based on their values in cell 15.. its just the process only gets applied to the first sheet in the array (rather then all 15).
Any ideas how to apply this to all the sheets in the array?
Bookmarks