#1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,069
Default SEARCH BOX

First thank you in advance for any help. I want to put a search box on the
first sheet of my program to enter data, either a name or an assigned number,
and have it search for and go to that line of information on another sheet.
Can I do this or do you have another suggestion?
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1,522
Default SEARCH BOX

This should do it. Change sheet name and column numbers to suit

Sub nameornumberfind()
With Sheets("sheet34")
mv = InputBox("Enter name or number")
If IsNumeric(mv) Then
'MsgBox "number"
mc = 4
Else
'MsgBox "text"
mc = 1
End If
Set mf = .Columns(mc).find(What:=mv, LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)

If Not mf Is Nothing Then
'MsgBox "found at " & mf.Row
Application.Goto .Cells(mf.Row, mc)
End If
End With
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"JOHN" wrote in message
...
First thank you in advance for any help. I want to put a search box on the
first sheet of my program to enter data, either a name or an assigned
number,
and have it search for and go to that line of information on another
sheet.
Can I do this or do you have another suggestion?


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
file search or search files Richad Excel Discussion (Misc queries) 0 October 22nd 09 07:56 PM
Functions (search within search result) reply to this please Nick Excel Worksheet Functions 1 February 17th 09 03:57 AM
Functions (search within search result) Nick Excel Worksheet Functions 1 February 17th 09 03:51 AM
Seo , Search Engine Optimizer , Seo Search engine Optimization , search engine optimization services, SEO Consulting Se0 Guy Charts and Charting in Excel 0 March 8th 07 04:08 AM
How do I search excel spreadsheets using multiple search criteria. Kasper Excel Worksheet Functions 4 December 15th 05 12:26 AM


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