Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding a cell
If I wish to find a cell containing some text, how do I find it and then
place the grid reference in a variable. Thanks Michael |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding a cell
the "grid reference" is in the variable rng
Dim rng as Range sStr = "text" set rng = Cells.find(what:=sStr, _ LookIn:=xlValues, LookAt:=xlPart) if not rng is nothing then msgbox rng.Address else msgbox sStr & " Not Found!" End if -- Regards, Tom Ogilvy "Himszy" wrote in message .. . If I wish to find a cell containing some text, how do I find it and then place the grid reference in a variable. Thanks Michael |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding a cell
Thanks Tom
"Tom Ogilvy" wrote in message ... the "grid reference" is in the variable rng Dim rng as Range sStr = "text" set rng = Cells.find(what:=sStr, _ LookIn:=xlValues, LookAt:=xlPart) if not rng is nothing then msgbox rng.Address else msgbox sStr & " Not Found!" End if -- Regards, Tom Ogilvy "Himszy" wrote in message .. . If I wish to find a cell containing some text, how do I find it and then place the grid reference in a variable. Thanks Michael |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding a cell
Tom is there a way of removing the $ signs?
"Himszy" wrote in message ... Thanks Tom "Tom Ogilvy" wrote in message ... the "grid reference" is in the variable rng Dim rng as Range sStr = "text" set rng = Cells.find(what:=sStr, _ LookIn:=xlValues, LookAt:=xlPart) if not rng is nothing then msgbox rng.Address else msgbox sStr & " Not Found!" End if -- Regards, Tom Ogilvy "Himszy" wrote in message .. . If I wish to find a cell containing some text, how do I find it and then place the grid reference in a variable. Thanks Michael |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding a cell
Dim rng as Range
sStr = "text" set rng = Cells.find(what:=sStr, _ LookIn:=xlValues, LookAt:=xlPart) if not rng is nothing then msgbox rng.Address(0,0) else msgbox sStr & " Not Found!" End if -- Regards, Tom Ogilvy "Himszy" wrote in message ... Tom is there a way of removing the $ signs? "Himszy" wrote in message ... Thanks Tom "Tom Ogilvy" wrote in message ... the "grid reference" is in the variable rng Dim rng as Range sStr = "text" set rng = Cells.find(what:=sStr, _ LookIn:=xlValues, LookAt:=xlPart) if not rng is nothing then msgbox rng.Address else msgbox sStr & " Not Found!" End if -- Regards, Tom Ogilvy "Himszy" wrote in message .. . If I wish to find a cell containing some text, how do I find it and then place the grid reference in a variable. Thanks Michael |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
finding last non-blank cell and then copying it to the next cell | Excel Discussion (Misc queries) | |||
Finding Corresponding Cell Value | Excel Discussion (Misc queries) | |||
Finding last cell | Excel Worksheet Functions | |||
finding a cell | Excel Programming | |||
Finding a cell | Excel Programming |