Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default hide columns automatically

i don't know what you mean by "capture", but this is what i came up
with. when you activate sheet 2, it automatically checks for zero
values & hides those columns. place the code in the worksheet code
area of worksheet 2. hope it helps!
==============
Option Explicit

Private Sub Worksheet_Activate()

Dim myR As Range
Dim r As Range

Set myR = Range("b2:g2")

For Each r In myR
If r.Value = "0" Then
r.EntireColumn.Hidden = True
End If
Next r

End Sub
===================
susan



On Jun 17, 9:15*am, Chicom17
wrote:
Sheet A & B look like this
* * Month *Jan- Feb -March-April- May -June
* * Select * 1 * * 1 * * * *1 * * * 0 * * * 0 * * *0

If i capture 1 on sheet A it will reflect on Sheet B. I need to atomatically
hide 0 columns on sheet B, and this colums wil automatically show when i
capture 1 on sheet A


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 automatically hide empty columns in Excel? Ned Mains Excel Discussion (Misc queries) 3 April 29th 23 07:44 PM
How do I automatically hide columns? PPM at Brackmills Excel Discussion (Misc queries) 8 March 18th 10 03:34 AM
Want to Hide columns in spreadsheet but NOT hide data in chart. KrispyData Charts and Charting in Excel 1 March 20th 09 04:45 PM
Automatically hide/unhide columns laststraw Excel Discussion (Misc queries) 11 September 12th 07 12:54 PM
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


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