LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default Search a value in all w/sheets and make a list.

Can you use a User Defined Function (UDF)? If so, this should do the trick
for you. A UDF is a macro in the form of a Function that can be used in a
worksheet just like built-in Excel worksheet functions.

To insert this code into the workbook, press [Alt]+[F11] to open the VB
Editor, then choose Insert | Module to create a new code module. Copy the
code below and paste it into the module. Close the VB Editor.

Anywhere that you want to see the list, place this formula into the cell,
and format the cell to allow word-wrapping and make the row tall enough to
see multiple entries:
=wherearependings()

I hope this helps some. Here is the code to copy and paste:

Public Function WhereArePendings()
Dim anySheet As Worksheet
Dim testRange As Range

Application.Volatile
WhereArePendings = "None Pending"
For Each anySheet In Worksheets
Set testRange = anySheet.Range("M5")
If UCase(Trim(testRange)) = "PENDING" Then
If WhereArePendings = "None Pending" Then
WhereArePendings = anySheet.Name
Else
WhereArePendings = _
WhereArePendings & vbLf & anySheet.Name
End If
End If
Next
Set testRange = Nothing
End Function


"TUNGANA KURMA RAJU" wrote:

In all my w/sheets of my active w/book ,range("M5') has a value "pending" or
"completed". I need a function that returns list of those work sheet names
with"pending" value in range("M5").
Thank you all excel experts in advance.

 
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
Search in Multiple Sheets [email protected] Excel Discussion (Misc queries) 4 September 12th 07 10:33 PM
Data from two sheets make up real time list in the new sheet?? Vedad Excel Worksheet Functions 7 September 20th 06 08:22 AM
Data from two sheets make up a list in a third sheet (real time) Vedad Excel Worksheet Functions 1 September 15th 06 03:25 PM
How do I make a search sheet? Jadziah Excel Worksheet Functions 0 December 12th 05 07:07 PM
better search: "make worksheet visible" christo Excel Discussion (Misc queries) 1 December 1st 04 12:20 AM


All times are GMT +1. The time now is 03:46 PM.

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"