![]() |
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? |
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? |
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? |
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? . |
All times are GMT +1. The time now is 03:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com