Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
The following macro will find a cell whose contents is the word "treasure" in
a workbook: Sub findtreasure() Dim w As Worksheet Dim s As String Dim r As Range s = "treasure" For Each w In ActiveWorkbook.Worksheets w.Activate For Each r In ActiveSheet.UsedRange If r.Value = s Then MsgBox (w.Name & " " & r.Address) Exit Sub End If Next Next MsgBox ("value not found") End Sub If you are not familiar with using macros, see: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Gary's Student "computerfineman" wrote: Assuming I have a workbook with many worksheets and I want to search for a particular word contained in one of the cells, in one of the sheets somewhere in the workbook, how do I go about it? Please help! -- computerfineman ------------------------------------------------------------------------ computerfineman's Profile: http://www.excelforum.com/member.php...o&userid=37165 View this thread: http://www.excelforum.com/showthread...hreadid=571152 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
vba searching for strings in multiple worksheets | Excel Discussion (Misc queries) | |||
searching multiple worksheets | Excel Worksheet Functions | |||
Copy Worksheets from one Workbook to Another | Excel Worksheet Functions | |||
Help searching and summing across multilple worksheets | Excel Discussion (Misc queries) | |||
HELP! How do you--> Lock a set of rows but also link worksheets to | Excel Discussion (Misc queries) |