Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default searchbox in excel sheet

Hi,

I have a column of about 1000 names surnames.

to enter a new name, or searching for a name
I would like to have some kind of search box so when i type the first letter
or the first 2 letters, i only see the names which starts with those
letters.

Has anyone any idea / solution?

thanks for all the help

swingleft

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default searchbox in excel sheet

On Apr 25, 12:59*am, "Swingleft" wrote:
Hi,

I have a column of about 1000 names surnames.

to enter a new name, or searching for a name
I would like to have some kind of search box so when i type the first letter
or the first 2 letters, i only see the names which starts with those
letters.

Has anyone any idea / solution?

thanks for all the help

swingleft


try this... this may server your purpose

1. convert the data into a table say "Table1"

2. Write a macro that filters the table based on a value passed:
Sub Macro1(Val As String)
Range("Table1[[#Headers],[Column1]]").Select
Selection.AutoFilter
ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=1,
Criteria1:=LCase$(Val) & "*", Operator:=xlAnd
End Sub

3. use cell A1 in your sheet to enter the search criteria.

4. Call the macro in the worksheet_change event
Private Sub Worksheet_Change(ByVal Target As Range)

Macro1 LCase$(Target.Cells(1, 1))
End Sub

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 create Login & Log out Spread sheet in Excel with automated Attendance sheet marc5354 Excel Worksheet Functions 2 September 21st 10 04:22 PM
Split text file into Excel sheet and separate the final results intoa new sheet Luciano Paulino da Silva Excel Worksheet Functions 8 April 18th 09 02:00 AM
excel sheet bootom half sheet goes behind top part of sheet rob Excel Worksheet Functions 2 January 17th 09 01:28 AM
Excel VBA (?!)-refer to a cell on Sheet to left of X, based on criteria on Sheet X tempjones Excel Programming 2 June 7th 04 09:48 PM
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet arunjoshi[_5_] Excel Programming 1 May 2nd 04 03:50 PM


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