Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Newbee Q: How to make search field in excel sheet?

Hi.
I am using Excel in a rather stupid way. I work in sales and have al
my company leads in here, so I can keep them in check. What I woul
like to have though, is a field where I can type part of a compan
name, and then the Excel ark goes to the first cell that matches...

It seems so simple, but I have almost never used Excel before, so I'
lost...

Any quick tips out there

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Newbee Q: How to make search field in excel sheet?

Use Edit=Find

--
Regards,
Tom Ogilvy

"kandinsky " wrote in message
...
Hi.
I am using Excel in a rather stupid way. I work in sales and have all
my company leads in here, so I can keep them in check. What I would
like to have though, is a field where I can type part of a company
name, and then the Excel ark goes to the first cell that matches...

It seems so simple, but I have almost never used Excel before, so I'm
lost...

Any quick tips out there?


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Newbee Q: How to make search field in excel sheet?

Yup... That's actually the functions i'm lookng for, but for reasons
don't really understand myself, I would like to implement the funktio
into a textfield+submit button...

Any ideas?

(Except the obvious "Use another more apropiate program for tha
stuff"... :o

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Newbee Q: How to make search field in excel sheet?

Record a macro when you do Edit|find.

But then you'll need to modify it slightly to stop errors in typing.

This recorded macro:
Columns("A:A").Select
Selection.Find(What:="asdf", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

could become:

Option Explicit
Sub SearchForName()

Dim FoundCell As Range
Dim CellWithName As Range


With Worksheets("sheet1")
Set CellWithName = .Range("A1")
If Trim(CellWithName.Value) = "" Then
MsgBox "Please type something"
Exit Sub
End If

With .Range("a2", .Cells(.Rows.Count, "A").End(xlUp))
Set FoundCell = .Cells.Find(What:=CellWithName.Value, _
After:=.Cells(.Cells.Count), _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByColumns, _
SearchDirection:=xlNext, _
MatchCase:=False)
End With

If FoundCell Is Nothing Then
MsgBox "not there"
Else
Application.Goto reference:=FoundCell, Scroll:=True
End If
End With

End Sub



"kandinsky <" wrote:

Yup... That's actually the functions i'm lookng for, but for reasons I
don't really understand myself, I would like to implement the funktion
into a textfield+submit button...

Any ideas?

(Except the obvious "Use another more apropiate program for that
stuff"... :o)

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson

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
how to make search button in the first sheet ghost Excel Discussion (Misc queries) 0 July 28th 07 07:20 AM
How to make a field created a part of the Pivot Table Field List? drhell Excel Discussion (Misc queries) 0 January 29th 07 11:13 PM
can I make a field in excel spreadsheet required? If yes, How? Ginycub22 Excel Discussion (Misc queries) 0 August 23rd 06 08:30 PM
newbee got a problem climax Excel Discussion (Misc queries) 2 January 30th 06 01:21 PM
How do I make a search sheet? Jadziah Excel Worksheet Functions 0 December 12th 05 07:07 PM


All times are GMT +1. The time now is 11:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"