#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Adding a search box

Is there anyway to add a search box to an excel sheet,, similar to "find and
replace" pop up search box

Regards


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Adding a search box

You don't like the default search dialog?

Sub look()
Dim whatwant As String
whatwant = InputBox("Choose Criteria" & Chr(13) _
& "Wildcards such as *Milly* can be used")
'do things with whatwant
End Sub


Gord Dibben MS Excel MVP

On Mon, 11 Aug 2008 11:33:52 +0100, "MillyD"
wrote:

Is there anyway to add a search box to an excel sheet,, similar to "find and
replace" pop up search box

Regards


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Adding a search box

Can't get it to work....... or I'm doing it wrong

Never mind........ Cheers

"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
You don't like the default search dialog?

Sub look()
Dim whatwant As String
whatwant = InputBox("Choose Criteria" & Chr(13) _
& "Wildcards such as *Milly* can be used")
'do things with whatwant
End Sub


Gord Dibben MS Excel MVP

On Mon, 11 Aug 2008 11:33:52 +0100, "MillyD"
wrote:

Is there anyway to add a search box to an excel sheet,, similar to "find
and
replace" pop up search box

Regards




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Adding a search box

You need additional code to do something with the results of the entry.

What do you want to do with the result of your search?

Here is some sample code to select a column, do a search and color rows.

Option Compare Text
Sub Delete_By_Criteria()
Dim I As Integer
Dim iLastRow As Integer
Dim Collet As String
Set wks = ActiveSheet
Application.ScreenUpdating = False
Collet = InputBox("Choose Column Letter")
whatwant = InputBox("Choose Criteria" & Chr(13) _
& "Wildcards such as *PY* can be used")
iLastRow = wks.Cells(Rows.Count, Collet).End(xlUp).Row
For I = iLastRow To 1 Step -1
If wks.Cells(I, Collet).Value Like whatwant Then
wks.Rows(I).Interior.ColorIndex = 3
End If
Next I
Application.ScreenUpdating = True
End Sub


Gord

On Tue, 12 Aug 2008 08:53:14 +0100, "MillyD"
wrote:

Can't get it to work....... or I'm doing it wrong

Never mind........ Cheers

"Gord Dibben" <gorddibbATshawDOTca wrote in message
.. .
You don't like the default search dialog?

Sub look()
Dim whatwant As String
whatwant = InputBox("Choose Criteria" & Chr(13) _
& "Wildcards such as *Milly* can be used")
'do things with whatwant
End Sub


Gord Dibben MS Excel MVP

On Mon, 11 Aug 2008 11:33:52 +0100, "MillyD"
wrote:

Is there anyway to add a search box to an excel sheet,, similar to "find
and
replace" pop up search box

Regards




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Adding a search box

Cheers....... but I think it is a bit to advanced for me..

I'll just use Ctrl F

Thanks again sorry for wasting your time


"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
You need additional code to do something with the results of the entry.

What do you want to do with the result of your search?

Here is some sample code to select a column, do a search and color rows.

Option Compare Text
Sub Delete_By_Criteria()
Dim I As Integer
Dim iLastRow As Integer
Dim Collet As String
Set wks = ActiveSheet
Application.ScreenUpdating = False
Collet = InputBox("Choose Column Letter")
whatwant = InputBox("Choose Criteria" & Chr(13) _
& "Wildcards such as *PY* can be used")
iLastRow = wks.Cells(Rows.Count, Collet).End(xlUp).Row
For I = iLastRow To 1 Step -1
If wks.Cells(I, Collet).Value Like whatwant Then
wks.Rows(I).Interior.ColorIndex = 3
End If
Next I
Application.ScreenUpdating = True
End Sub


Gord

On Tue, 12 Aug 2008 08:53:14 +0100, "MillyD"
wrote:

Can't get it to work....... or I'm doing it wrong

Never mind........ Cheers

"Gord Dibben" <gorddibbATshawDOTca wrote in message
. ..
You don't like the default search dialog?

Sub look()
Dim whatwant As String
whatwant = InputBox("Choose Criteria" & Chr(13) _
& "Wildcards such as *Milly* can be used")
'do things with whatwant
End Sub


Gord Dibben MS Excel MVP

On Mon, 11 Aug 2008 11:33:52 +0100, "MillyD"
wrote:

Is there anyway to add a search box to an excel sheet,, similar to "find
and
replace" pop up search box

Regards






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
Seo , Search Engine Optimizer , Seo Search engine Optimization , search engine optimization services, SEO Consulting Se0 Guy Excel Worksheet Functions 0 March 8th 07 05:08 AM
Seo , Search Engine Optimizer , Seo Search engine Optimization , search engine optimization services, SEO Consulting Se0 Guy Excel Discussion (Misc queries) 0 March 8th 07 05:08 AM
Seo , Search Engine Optimizer , Seo Search engine Optimization , search engine optimization services, SEO Consulting Se0 Guy Setting up and Configuration of Excel 0 March 8th 07 05:08 AM
Seo , Search Engine Optimizer , Seo Search engine Optimization , search engine optimization services, SEO Consulting Se0 Guy Links and Linking in Excel 0 March 8th 07 05:08 AM
How do I search excel spreadsheets using multiple search criteria. Kasper Excel Worksheet Functions 4 December 15th 05 01:26 AM


All times are GMT +1. The time now is 08:57 PM.

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"