LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
KL KL is offline
external usenet poster
 
Posts: 201
Default Table of Contents - Data from unhidden sheets only

Hi,

Try this:

Sub TEST()
Dim ws As Worksheet
Dim i As Long
With ActiveWorkbook
For Each ws In .Worksheets
Select Case True
Case ws.Visible And ws.Name < "Contents"
.Sheets("Contents").Cells(i + 1, 1) = _
ws.Range("A1")
i = i + 1
End Select
Next
End With
End Sub

Regards,
KL

"Scott J. Hamilton" <Scott J. wrote in
message ...
I have a financial planning workbook with 30 sheets. The book has a table
of
contents that is created manually by pulling info from cell A1 of each
sheet.
However, we hide certain sheets depending on the situation. The sheets
that
are hidden in any given situation is unpredictable.

Is there a way to automate pulling data only from the unhidden sheets and
then putting it onto a table of contents page?



 
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
sumproduct with unhidden data [email protected] Excel Worksheet Functions 1 March 4th 08 01:44 AM
Pivot Table COUNTA SUM of Unhidden cells only Sarah Excel Worksheet Functions 1 August 17th 07 04:52 PM
Pivot Table Counta formula and sum for unhidden cells only Sarah Excel Discussion (Misc queries) 0 August 17th 07 09:38 AM
How can I combine data from two sheets where field contents match? amaries Excel Worksheet Functions 6 July 6th 07 10:59 PM
Calculations on Only Unhidden Data Cells dcotejr Excel Discussion (Misc queries) 1 October 3rd 05 05:35 PM


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