#1   Report Post  
Zadig Galbaras
 
Posts: n/a
Default Title listing...

Hi!

Is there a way to list the spreadsheets which were a certain cell contains a
certain value?
f.ex.
List the spreadsheet name if cell D4 contains 2004.
This should result in a list where all spreadsheets that have the value 2004
in D4.

Is this possible?


--

Regards
Zadig Galbaras
A Perturbed Norwegian Agnostic
-----



  #2   Report Post  
Norman Jones
 
Posts: n/a
Default

Hi Zadig,

Try:

'=======================
Public Sub Tester05()
Dim WB As Workbook
Dim SH As Worksheet
Dim ws As Worksheet
Dim i As Long
Const sStr As String = "MyList"
Const strControlValue As String = "2004"
Set WB = ActiveWorkbook '<<=========== CHANGE

On Error Resume Next `'In case no List sheet exists!
Application.DisplayAlerts = False
WB.Sheets(sStr).Delete 'Delete a pre-existing List (if any!)
Application.DisplayAlerts = True
On Error GoTo 0

Set ws = WB.Sheets.Add

ws.Name = sStr

For Each SH In WB.Sheets
With SH
If CStr(.Range("D4").Value) = strControlValue Then
i = i + 1
ws.Cells(i, 1) = SH.Name
End If
End With
Next SH

End Sub
'<<=======================

---
Regards,
Norman



"Zadig Galbaras" wrote in message
...
Hi!

Is there a way to list the spreadsheets which were a certain cell contains
a certain value?
f.ex.
List the spreadsheet name if cell D4 contains 2004.
This should result in a list where all spreadsheets that have the value
2004 in D4.

Is this possible?


--

Regards
Zadig Galbaras
A Perturbed Norwegian Agnostic
-----





  #3   Report Post  
Zadig Galbaras
 
Posts: n/a
Default

I'll check this soon...stressed times....puh... got to go.....running low...

--

Regards
Zadig Galbaras
A Perturbed Norwegian Agnostic
-----


"Norman Jones" skrev i melding
...
Hi Zadig,

Try:

'=======================
Public Sub Tester05()
Dim WB As Workbook
Dim SH As Worksheet
Dim ws As Worksheet
Dim i As Long
Const sStr As String = "MyList"
Const strControlValue As String = "2004"
Set WB = ActiveWorkbook '<<=========== CHANGE

On Error Resume Next `'In case no List sheet exists!
Application.DisplayAlerts = False
WB.Sheets(sStr).Delete 'Delete a pre-existing List (if any!)
Application.DisplayAlerts = True
On Error GoTo 0

Set ws = WB.Sheets.Add

ws.Name = sStr

For Each SH In WB.Sheets
With SH
If CStr(.Range("D4").Value) = strControlValue Then
i = i + 1
ws.Cells(i, 1) = SH.Name
End If
End With
Next SH

End Sub
'<<=======================

---
Regards,
Norman



"Zadig Galbaras" wrote in message
...
Hi!

Is there a way to list the spreadsheets which were a certain cell
contains a certain value?
f.ex.
List the spreadsheet name if cell D4 contains 2004.
This should result in a list where all spreadsheets that have the value
2004 in D4.

Is this possible?


--

Regards
Zadig Galbaras
A Perturbed Norwegian Agnostic
-----







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
Excel XP: File name in Title Bar not changed after Save As... Dominic Excel Discussion (Misc queries) 9 August 1st 05 12:58 PM
Relative Chart Title? Nick M Charts and Charting in Excel 6 June 22nd 05 09:24 PM
Pasting Objects into Chart title and Axis title Sam Charts and Charting in Excel 1 June 6th 05 08:50 PM
how to cell reference a Chart title Rasoul Khoshravan Azar Charts and Charting in Excel 2 January 1st 05 05:00 PM
The x-axis title is truncated in EXCEL charts 2003. Bernard Liengme Charts and Charting in Excel 0 November 26th 04 05:25 PM


All times are GMT +1. The time now is 05:01 PM.

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"