LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default Find Value in Workbook

I have the following VBA Code in the Active Worksheet to search for a value
(cell J3) in column( D) then activate the cell if found. I would like to
modify the code to search for the value in cell J3 in all worksheets in the
workbook, then have a prompt to activate that cell in the sheet it is located
or do another search for the same value. I realize I can do this by the Find
function but this would work much better for my application. Thank you

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("J3"), Target) Is Nothing Then

Dim FoundCell As Range

With ActiveSheet

Set FoundCell = .Range("D:D").Find(what:=Range("J3").Value)

If FoundCell Is Nothing Then
MsgBox "EIN not found. Do not include the dashes in your search."
Else
FoundCell.Activate
End If
End With
End If
End Sub
 
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
How to find a workbook name? Stephen Excel Programming 8 November 11th 09 03:23 AM
find in workbook stumped Excel Programming 0 December 28th 08 03:34 PM
Find cell in Excel2000 workbook with link from another workbook? Mark4mmx Excel Discussion (Misc queries) 1 October 8th 08 12:55 PM
set cell in one workbook to find in another workbook [email protected] Excel Programming 1 August 19th 08 05:48 AM
Open a specific workbook...find value from other open workbook and then insert cells values in cell next to it. [email protected] Excel Programming 1 May 13th 07 01:46 PM


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