Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
PPM at Brackmills
 
Posts: n/a
Default How do I automatically hide columns?

I have a table with dates as the top row. I want Excel to find todays date
and then hide the columns after todays date. In this way I can make the
printed output bigger and more readable.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default How do I automatically hide columns?

try
Sub findtoday_hidecolsafter()
x = Rows(2).Find(Date).Column + 1
Range(Cells(1, x), Cells(1, Columns.Count)).Columns.Hidden = True
End Sub


--
Don Guillett
SalesAid Software

"PPM at Brackmills" <PPM at
wrote in
message ...
I have a table with dates as the top row. I want Excel to find todays date
and then hide the columns after todays date. In this way I can make the
printed output bigger and more readable.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How do I automatically hide columns?

I was looking to do the same (but with the dates at the start of rows). I
have tried this bit of code but how do I get it to actually run?

"Don Guillett" wrote:

try
Sub findtoday_hidecolsafter()
x = Rows(2).Find(Date).Column + 1
Range(Cells(1, x), Cells(1, Columns.Count)).Columns.Hidden = True
End Sub


--
Don Guillett
SalesAid Software

"PPM at Brackmills" <PPM at
wrote in
message ...
I have a table with dates as the top row. I want Excel to find todays date
and then hide the columns after todays date. In this way I can make the
printed output bigger and more readable.




  #4   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson
 
Posts: n/a
Default How do I automatically hide columns?

You can do this with some simple VBA code:

Sub AAA()
Dim Rng As Range
Dim Found As Boolean
For Each Rng In Range(Cells(1, 1), Cells(1, Columns.Count)).Cells
If Rng.Value = Date Then
Found = True
Exit For
End If
Next Rng
If Found = True Then
Range(Rng(1, 2), Cells(1, Columns.Count)).EntireColumn.Hidden
= True
End If
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"PPM at Brackmills" <PPM at
wrote in message
...
I have a table with dates as the top row. I want Excel to find
todays date
and then hide the columns after todays date. In this way I can
make the
printed output bigger and more readable.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How do I automatically hide columns and then show

how do I hide a column and only have it unhide automatically if data is
present in those cells?




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default How do I automatically hide columns and then show

Hi, I am looking for the same answer on rows. thanks, kelly

"iallen" wrote:

how do I hide a column and only have it unhide automatically if data is
present in those cells?


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How do I automatically hide columns and then show

I need this information as well. I have a "Quote" being generated that,
depending on the amount of items requested, there may be 5-10 blank rows
before the next section of the quote...I would like to have the rows either
automatically hidden or deleted if there is no quantity on the data. Can
anyone help!?

Thanks.


"plumfin" wrote:

Hi, I am looking for the same answer on rows. thanks, kelly

"iallen" wrote:

how do I hide a column and only have it unhide automatically if data is
present in those cells?


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How do I automatically hide columns and then show



"plumfin" wrote:

Hi, I am looking for the same answer on rows. thanks, kelly

"iallen" wrote:

how do I hide a column and only have it unhide automatically if data is
present in those cells?


  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How do I automatically hide columns?



"PPM at Brackmills" wrote:

I have a table with dates as the top row. I want Excel to find todays date
and then hide the columns after todays date. In this way I can make the
printed output bigger and more readable.

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
How do I delete columns and rows in Excel, not just hide them Eddie Excel Discussion (Misc queries) 2 November 23rd 05 05:11 PM
Hide rows automatically kim Excel Discussion (Misc queries) 1 September 14th 05 02:23 PM
How do I hide columns using a button that slides back and forth Virginia53 Excel Worksheet Functions 1 May 28th 05 12:51 AM
How do I automatically hide columns in a worksheet based on a cell value? dkhedkar Excel Worksheet Functions 1 March 5th 05 12:20 AM
Hide Cell Content if no data in previous columns Sherry Excel Discussion (Misc queries) 4 February 21st 05 07:27 PM


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