View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] googly-al@ashbourne-town.com is offline
external usenet poster
 
Posts: 1
Default Select a column based on a cell entry

I've been struggling for a day now in trying to write a macro that will
cycle through all the worksheets in a workbook, then check each column
for the word "HIDE" in a certain row (15) in each column, then if it
finds it, hides the column.

e.g.(with a bit of psudo code thrown in :-(

For I = 1 To Worksheets.Count
ActiveWorkbook.Worksheets(I).Select

For Each col In Worksheets(I).Columns

if row 15 = "HIDE"
Then
Column(col).Select
Selection.EntireColumn.Hidden = True
Next col

Next


I've tried most things, but my VBA skills are not yet good enough to
manage this.

Any help anybody?? Please??