Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
finding a value
Hi,
How can I find a certain value, say x, in all the sheets in a workbook or excel file? After finding it, I must output all the sheet names that has x and its cell location on a msgbox. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
finding a value
try this
sub findX() dim i as integer dim cell set X=activecell.value for i=1 to sheets.count sheets(i).select range("A1").select set a=selection range(a,a.specialcells(xlcelltypelastcell)).select for each cell in selection if cell.value=X.value then msgbox "X.value is in sheet " & sheet.name exit for end if next next end sub regards Mark PS see my Excel site http://www.geocities.com/excelmarksway -----Original Message----- Hi, How can I find a certain value, say x, in all the sheets in a workbook or excel file? After finding it, I must output all the sheet names that has x and its cell location on a msgbox. Thanks. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding * | Excel Discussion (Misc queries) | |||
Finding non-zero value | Excel Discussion (Misc queries) | |||
Finding last used | Excel Worksheet Functions | |||
Finding value | Excel Discussion (Misc queries) | |||
finding the "end" | New Users to Excel |