Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Alternate to Range.Find

Hi,

I am looking for a better way to search a column.

example of what i am doing;

dim col as string = "C1:C100"
Set fndCell = ActiveSheet.Range(col).Find(11)

the problem is that the above code returns the first cell containing 11
(432110 would be and example)

does anyone know of a 'find' that returns the cell satisfying the exact
search criteria?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Alternate to Range.Find

Hi Jeff

Look in the VBA help for the arguments of Find.



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Jeff Sward" wrote in message ...
Hi,

I am looking for a better way to search a column.

example of what i am doing;

dim col as string = "C1:C100"
Set fndCell = ActiveSheet.Range(col).Find(11)

the problem is that the above code returns the first cell containing 11
(432110 would be and example)

does anyone know of a 'find' that returns the cell satisfying the exact
search criteria?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Alternate to Range.Find

Jeff I would suggest you try using some sort of text field
that the search string is entered into and the refer back
to that as the search string.

like

use textbox(1) as Search_for
then incorporate your code

dim col as string = "C1:C100"
Set fndCell = ActiveSheet.Range(col).Find(Search_for)

Not sure if that would work but might be worth a shot

Andy

-----Original Message-----
Hi,

I am looking for a better way to search a column.

example of what i am doing;

dim col as string = "C1:C100"
Set fndCell = ActiveSheet.Range(col).Find(11)

the problem is that the above code returns the first cell

containing 11
(432110 would be and example)

does anyone know of a 'find' that returns the cell

satisfying the exact
search criteria?


.

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 Last cell in Range when range is date format default105 Excel Discussion (Misc queries) 5 July 7th 09 03:11 PM
Find a range of values in a range of cells Jack Taylor Excel Worksheet Functions 20 November 25th 06 01:26 PM
Return alternate value if VLookup can't find match SueJB Excel Worksheet Functions 7 January 5th 06 09:30 AM
Find dates in a range; then sum values in that range by a criteria Anders Excel Discussion (Misc queries) 4 October 21st 05 03:41 PM
Sum alternate columns over a large (>100) range Kanga 85 Excel Discussion (Misc queries) 11 December 26th 04 04:32 AM


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