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: 27,285
Default FINDing data only in one column

Range("A1").Select
Range("A:A").Find(What:=Worksheets("Front_End").Ra nge("C6").Value, _
After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False).Activate

Better would be

Dim rng as Range
Set rng =
Range("A:A").Find(What:=Worksheets("Front_End").Ra nge("C6").Value, _
After:=Range("A65536"), LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False)
if not rng is nothing then
rng.activate
else
msgbox "Not found"
exit sub
End if

--
Regards,
Tom Ogilvy



"Mr B" wrote in message
...
How can I use the Find command to have Excel saerch for a string but to

only look in the A column and not in any other column?

I'm currently using this statement:

Range("A1").Select
Cells.Find(What:=Worksheets("Front_End").Range("C6 ").Value,

After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,

MatchCase:= _
False).Activate

I'm not sure what searching byrows vs cybolumns does, but I really want it

to ONLY look in the A column and if it doesn't find it there, then to stop.

Thanks



 
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
Finding multiple data values in a column PeteJ Excel Worksheet Functions 2 September 15th 09 07:16 PM
FINDING AND LISTING UNIQUE DATA IN A COLUMN cncrouterman Excel Worksheet Functions 3 July 2nd 09 02:20 PM
Finding data in a text column Secret Squirrel Excel Discussion (Misc queries) 4 November 10th 07 05:23 PM
Finding last cell with data in a column Nigel Bennett Setting up and Configuration of Excel 2 April 29th 05 08:03 PM
FINDing data only in one column Vasant Nanavati Excel Programming 0 April 12th 04 04:24 PM


All times are GMT +1. The time now is 08:26 AM.

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"