Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I have a range named OMSZ, and I'd like to use this name in Find, but this line gives an error: MyVar = ThisWorkbook.Names("OMSZ").Find("StringToSearchFor ", [A1], , , xlByRows, xlNext).Row What is the correct syntax? The named range is OK, because e.g. MyRange = ThisWorkbook.Names("OMSZ").RefersTo gives back the correct range. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
..Find is a method of a Range object. Try either Range("OMSZ").Find or
Range(MyRange).Find. Mike F "Stefi" wrote in message ... Hi All, I have a range named OMSZ, and I'd like to use this name in Find, but this line gives an error: MyVar = ThisWorkbook.Names("OMSZ").Find("StringToSearchFor ", [A1], , , xlByRows, xlNext).Row What is the correct syntax? The named range is OK, because e.g. MyRange = ThisWorkbook.Names("OMSZ").RefersTo gives back the correct range. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Mike,
having made some experiments I found this form working: MyVar = ThisWorkbook.Names("OMSZ").RefersToRange.Find("Str ingToSearchFor", [A1], , , xlByRows, xlNext).Row Is there a simpler one? Regards, Stefi €žMike Fogleman€ ezt Ã*rta: ..Find is a method of a Range object. Try either Range("OMSZ").Find or Range(MyRange).Find. Mike F "Stefi" wrote in message ... Hi All, I have a range named OMSZ, and I'd like to use this name in Find, but this line gives an error: MyVar = ThisWorkbook.Names("OMSZ").Find("StringToSearchFor ", [A1], , , xlByRows, xlNext).Row What is the correct syntax? The named range is OK, because e.g. MyRange = ThisWorkbook.Names("OMSZ").RefersTo gives back the correct range. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find Last cell in Range when range is date format | Excel Discussion (Misc queries) | |||
Find the MAX number in range, then find... | Excel Discussion (Misc queries) | |||
Find a range of values in a range of cells | Excel Worksheet Functions | |||
Find dates in a range; then sum values in that range by a criteria | Excel Discussion (Misc queries) | |||
Find first cell in range and expand range -VBA | Excel Programming |