View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
turbogreg17 turbogreg17 is offline
external usenet poster
 
Posts: 6
Default Hiding columns based on value

Please help, Ive searched for the answer, but my problem seems to be unique.
Here is the background: I have a spreadsheet with many, many columns of data
(€œE€ through €œEO€ as of today, and it keeps growing). I have 9 rows of data
(rows 3 -12), so the area Im concerned with as of today spans E3:EO12. The
cells are either blank or contain a €œX€ (just two choices).
I want to hide every column that contains an €œX€ in each of its rows (i.e.
if every cell in €œE3:E12€ contains €œX€, then hide €œE€, same for column €œF€,
€œG€, etc.). If any one of the rows in a column is blank, I need to see the
column. I just cant get the syntax right for the macro.
I thought about redoing the macro code for each column, but there has to be
a better way. And it would be a bit cumbersome as I continue to add columns.
Can someone please help? Thanks. Greg