Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alternate to Range.Find
try find, lookat:=xlwhole
-- Don Guillett SalesAid Software "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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find Last cell in Range when range is date format | Excel Discussion (Misc queries) | |||
Find a range of values in a range of cells | Excel Worksheet Functions | |||
Return alternate value if VLookup can't find match | Excel Worksheet Functions | |||
Find dates in a range; then sum values in that range by a criteria | Excel Discussion (Misc queries) | |||
Sum alternate columns over a large (>100) range | Excel Discussion (Misc queries) |