Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB Find
How can I do a find within a range in VB and return the cell location of
that find? Thanks in advance for your help? Mike |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB Find
the following example returns all cells with the required value.
Tom Sub Find() Dim r As Range Dim strFind As String Dim strAddress As String strFind = "Hello" With ActiveSheet Set r = .Cells.Find(strFind) If Not r Is Nothing Then strAddress = r.Address Do MsgBox r.Address Set r = Cells.FindNext(r) Loop While Not r Is Nothing And r.Address < strAddress Else MsgBox "Not found" End If End With End Sub "Michael Kintner" schrieb im Newsbeitrag ... How can I do a find within a range in VB and return the cell location of that find? Thanks in advance for your help? Mike |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB Find
see the example code in Excel VBA help on the Find method.
or turn on the macro recorder, then do Edit=Find -- Regards, Tom Ogilvy "Michael Kintner" wrote in message ... How can I do a find within a range in VB and return the cell location of that find? Thanks in advance for your help? Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find First Non blank cell than find column header and return that value | Excel Worksheet Functions | |||
where to put results of find operation in find and replace functio | Excel Worksheet Functions | |||
Despite data existing in Excel 2002 spreadsheet Find doesn't find | Excel Discussion (Misc queries) | |||
'find' somtimes can't find numbers. I folowd the 'help' instructi. | Excel Worksheet Functions | |||
How do I find a file/spreadsheet that Excel says is Already open but I can't find it? | Excel Discussion (Misc queries) |