LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need to program a find only in one column


Hi. I need to use the find tool in Excel but only for one column. How I
can do this? I have this:

Private Sub cmdTSearch_Click()
Dim DATA As String
DATA = txtTicket.Text

If txtTicket.Text = "" Then
MsgBox ("Text Box Empty")
Else
With Worksheets("Info").Range("X4:X700")
Set B = Cells.Find(What:=DATA, After:=ActiveCell, LookIn:=xlValues,
LookAt:= _
xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=True)

If B Is Nothing Then
MsgBox ("Nothing Found")
Else
Range("X4:X500").Select
Cells.Find(What:=DATA, After:=ActiveCell, LookIn:=xlValues,
LookAt:= _
xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=True).Activate

End If

'MsgBox ActiveWindow.RangeSelection.Address

End With
End If
End Sub


Thanks.
Angel


--
xrckiss
------------------------------------------------------------------------
xrckiss's Profile: http://www.excelforum.com/member.php...o&userid=33065
View this thread: http://www.excelforum.com/showthread...hreadid=528787

 
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 do you find the version of the EXCEL program??? Renee Excel Discussion (Misc queries) 3 September 22nd 09 04:46 PM
Where I can find the program MegaStat in Excel 2003? Mcarrion Excel Discussion (Misc queries) 1 August 9th 09 07:27 PM
Program find a 5 minute gap Striker New Users to Excel 12 December 4th 08 03:07 PM
How to find the correct program to download an .xls attachment sportshistorybuff Excel Discussion (Misc queries) 2 June 30th 06 04:49 PM
Can you find me a cash out program for a restaurant / bar? GP007 Excel Discussion (Misc queries) 1 November 3rd 05 01:36 PM


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