#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Autohide Columns

Is there a way to hide a column automatically if the sum of that column=0?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Autohide Columns

Sub hidezerocols()
Columns.Hidden = False
For i = 1 To 5 'number of columns
If Application.Sum(Columns(i)) = 0 _
Then Columns(i).Hidden = True
Next i
End Sub

--
Don Guillett
SalesAid Software

"Laus" wrote in message
...
Is there a way to hide a column automatically if the sum of that column=0?



Reply
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
Cutting and pasting from rows into columns and visa versa. Pank New Users to Excel 2 November 8th 06 01:54 PM
Need a macro to hide certain columns Dallman Ross Excel Discussion (Misc queries) 12 October 19th 06 05:58 PM
Selecting different multiple columns rcg Excel Worksheet Functions 1 September 26th 06 05:58 PM
adding three consecutive columns Darin Gibson Excel Worksheet Functions 1 November 22nd 05 08:50 PM
Removing Near-Duplicate Rows, Leaving Those w/Most Data in Specific Columns foofoo Excel Discussion (Misc queries) 1 April 2nd 05 12:02 AM


All times are GMT +1. The time now is 07:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"