Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Conditional Column Hide


I want to hide each column that meets a certain condition. ie. I want to
hide column 'B' if B3 < Today() or I want to hide column 'C' if C3 <
Today(), an so on down the line. Yes, I want to hide each column where
the date in row 3 is less than todays date.

Kevin


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Conditional Column Hide

Dim cell as Range
for each cell in Range("A3:IV3")
if not isempty(cell) then
if isdate(cell.value) then
if cell.Value < Date then
cell.EntireColumn.Hidden = True
else
cell.EntireColumn.Hidden = false
end if
end if
end if
Next

or


for each cell in Range("A3:IV3")
if not isempty(cell) then
if isdate(cell.value) then
cell.EntireColumn.Hidden = cellValue < Date
end if
end if
Next

--
Regards,
Tom Ogilvy


"firebird96" wrote in message
...

I want to hide each column that meets a certain condition. ie. I want to
hide column 'B' if B3 < Today() or I want to hide column 'C' if C3 <
Today(), an so on down the line. Yes, I want to hide each column where
the date in row 3 is less than todays date.

Kevin


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to

creating financial statements


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
Hide Column If Usedrange of Column ISBLANK Follow-up [email protected] Excel Discussion (Misc queries) 1 April 12th 09 10:00 PM
Hide Column If Usedrange of Column ISBLANK [email protected] Excel Discussion (Misc queries) 4 April 12th 09 09:47 PM
Conditional Hide Admin @ Aust-Mech Excel Worksheet Functions 6 March 16th 09 12:30 AM
Hide column or row based on a cell in the column or row? SacGuy Excel Discussion (Misc queries) 0 January 24th 06 06:51 PM
Hide cell value conditional on its value pstar Excel Worksheet Functions 2 January 4th 06 06:28 PM


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