Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Searching using part of a word rather than whole word in vba


Thank you for all the help, but I've figured it out.. thought I'd put i
here for the benifit of others:

Dim count as integer
dim name as string
dim vlookup as integer 'this is simply a counter for position o
worksheet
dim done as integer
count = textbox1.TextLength
name = Left((Sheet1.Cells(2, 1)), 3)
Do Until done = 1
name = Left((Sheet1.Cells(Vlookup, 1)), count)
If name = "" Then
done = 1
ElseIf name = Left(textbox1.Text, count) Then
With Me.listbox1
.AddItem Sheet1.Cells(Vlookup, 3)
.List(.ListCount - 1, 1) = Sheet1.Cells(Vlookup, 1)
.List(.ListCount - 1, 2) = Sheet1.Cells(Vlookup, 2)
.List(.ListCount - 1, 3) = Sheet1.Cells(Vlookup, 4)
End With
End If
Vlookup = Vlookup + 1
Loop



--
Devit
-----------------------------------------------------------------------
Devitt's Profile: http://www.excelforum.com/member.php...fo&userid=1442
View this thread: http://www.excelforum.com/showthread.php?threadid=26840

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
searching for a word(s) within a list Philippa Excel Discussion (Misc queries) 5 August 12th 08 07:30 PM
highlight the word when excel finds text you are searching for Sally M Excel Worksheet Functions 7 September 21st 06 06:07 PM
Is Excel or Word better for holding and searching data Ione Excel Discussion (Misc queries) 2 January 6th 06 09:46 AM
searching a cell for a contained text word Doug K Charts and Charting in Excel 0 June 20th 05 09:10 PM
Searching using part of a word rather than whole word in vba Devitt[_3_] Excel Programming 1 October 12th 04 10:33 AM


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