Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default search word or text in excel spreadsheet

Hello

Could somebody help me.

how could i find in the colomn A with an input box one word or sentence
writen in the input box.

Thanks for your help

Louis
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default search word or text in excel spreadsheet

Try this:

Sub louis()
Dim s As String
Set r = Intersect(Range("A:A"), ActiveSheet.UsedRange)
Set r2 = Nothing
s = Application.InputBox(prompt:="enter string:", Type:=2)
For Each rr In r
If rr.Value = Replace(rr.Value, s, "") Then
Else
If r2 Is Nothing Then
Set r2 = rr
Else
Set r2 = Union(r2, rr)
End If
End If
Next

If r2 Is Nothing Then
MsgBox ("Nothing Found")
Else
r2.Select
End If
End Sub

--
Gary''s Student - gsnu200765


"Louis" wrote:

Hello

Could somebody help me.

how could i find in the colomn A with an input box one word or sentence
writen in the input box.

Thanks for your help

Louis

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
Search text field for word GerryK Excel Discussion (Misc queries) 2 September 14th 07 03:42 PM
Capturing a word sequence as part of a text in a spreadsheet cell T.Mad Excel Worksheet Functions 4 July 3rd 07 12:08 PM
how to search a word in a excel file which appears twice Jegadeesan P r Excel Discussion (Misc queries) 0 October 26th 06 11:26 AM
Excel - let search for more than one disconnected word in a cell Milinds Excel Worksheet Functions 1 January 30th 06 11:20 PM
need formula to search column for a word and return another word Skyline Excel Discussion (Misc queries) 5 November 18th 05 10:00 PM


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