Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Find text in Column or Range Name

I'm using the following code to find a text entered in a textbox to
keep the user from entering a duplicate text, but it's searcing the
entire sheet. I just want the code to search column A.

Cells.Find(What:=TextBox1, After:=ActiveCell,
LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext,
MatchCase:=False) _
.Activate


How do I set the find for column A only?
Darrell

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Find text in Column or Range Name

Columns(1).Find(What:=TextBox1, After:=ActiveCell,
LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext,
MatchCase:=False) _
.Activate


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Lankchevy" wrote in message
oups.com...
I'm using the following code to find a text entered in a textbox to
keep the user from entering a duplicate text, but it's searcing the
entire sheet. I just want the code to search column A.

Cells.Find(What:=TextBox1, After:=ActiveCell,
LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext,
MatchCase:=False) _
.Activate


How do I set the find for column A only?
Darrell



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Find text in Column or Range Name

Bob,
Thanks for the assistance.
Darrell

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
Find the first or last populated column in a range Commish Excel Worksheet Functions 6 May 14th 09 10:16 PM
Find a text from a column in a text string within another column? Mike Garcia[_2_] New Users to Excel 1 October 22nd 08 06:50 PM
Using a Range to find text Cas Excel Worksheet Functions 7 March 28th 07 06:54 PM
How to find used range of a row/column? Von Shean Excel Programming 2 February 3rd 04 10:34 AM
Need to Find End Value of a Column with Unknown End Range Tricia[_3_] Excel Programming 2 August 24th 03 07:20 PM


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