Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Search Range in Function
I'm sending an argument into a function - Function Find_Them(Find_Item As Variant, Search_Range As Range, Optional LookIn As Variant, Optional LookAt As Variant, Optional MatchCase As Boolean) As Range The problem is 'Search_Range As Range'. If I call the function from code behind sheet, all Search_Range needs is e.g. ? search_range.address $J$2:$J$8964 and it works. But if I call the function from a module, it fails because I cannot figure out how to tell the function what Sheet to use. Can I include within the Search_Range argument the name of the Sheet? Thanks - Kirk |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Search Range in Function
Kirk,
Worksheets("Sheet1").Range("A1:A100") would mean A1:A100 range in the sheet named as "Sheet1". -- Hope that helps. Vergel Adriano "kirkm" wrote: I'm sending an argument into a function - Function Find_Them(Find_Item As Variant, Search_Range As Range, Optional LookIn As Variant, Optional LookAt As Variant, Optional MatchCase As Boolean) As Range The problem is 'Search_Range As Range'. If I call the function from code behind sheet, all Search_Range needs is e.g. ? search_range.address $J$2:$J$8964 and it works. But if I call the function from a module, it fails because I cannot figure out how to tell the function what Sheet to use. Can I include within the Search_Range argument the name of the Sheet? Thanks - Kirk |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to keep a set range in a Search function | Excel Worksheet Functions | |||
Search range for text not in another range | Excel Discussion (Misc queries) | |||
Search Range for item in seperate range | Excel Programming | |||
How do I create a function to search a range for a number and... | Excel Worksheet Functions | |||
How to search a range for a suburb in a large range | Excel Programming |