This documentation is archived and is not being maintained.

Range.Find Method 

Finds specific information in a range and returns a Range object that represents the first cell where that information is found.

Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in

Dim What As Object
Dim After As Object
Dim LookIn As Object
Dim LookAt As Object
Dim SearchOrder As Object
Dim SearchDirection As XlSearchDirection
Dim MatchCase As Object
Dim MatchByte As Object
Dim SearchFormat As Object
Dim returnValue As Range
Dim range1 As Range
returnValue = range1.Find(What, After, LookIn, LookAt, SearchOrder, SearchDirection, MatchCase, MatchByte, SearchFormat)

Range Find(
	[In] object What, 
	[In, Optional] object After, 
	[In, Optional] object LookIn, 
	[In, Optional] object LookAt, 
	[In, Optional] object SearchOrder, 
	[In, Optional] XlSearchDirection SearchDirection, 
	[In, Optional] object MatchCase, 
	[In, Optional] object MatchByte, 
	[In, Optional] object SearchFormat
public Range Find(
	/*in*/System.Object What, 
	/*in*/System.Object After, 
	/*in*/System.Object LookIn, 
	/*in*/System.Object LookAt, 
	/*in*/System.Object SearchOrder, 
	/*in*/XlSearchDirection SearchDirection, 
	/*in*/System.Object MatchCase, 
	/*in*/System.Object MatchByte, 
	/*in*/System.Object SearchFormat
function Find(
	 What : Object, 
	 After : Object, 
	 LookIn : Object, 
	 LookAt : Object, 
	 SearchOrder : Object, 
	 SearchDirection : XlSearchDirection, 
	 MatchCase : Object, 
	 MatchByte : Object, 
	 SearchFormat : Object
) : Range;



Required Object. The data to search for. Can be a string or any Microsoft Excel data type.


Optional Object. The cell after which you want the search to begin. This corresponds to the position of the active cell when a search is done from the user interface. Note that After must be a single cell in the range. Remember that the search begins after this cell; the specified cell isn’t searched until the method wraps back around to this cell. If you don’t specify this argument, the search starts after the cell in the upper-left corner of the range.


Optional Object. The type of information.


Optional Object. Can be one of the following XlLookAt constants: xlWhole or xlPart.


Optional Object. Can be one of the following XlSearchOrder constants: xlByRows or xlByColumns.


Optional XlSearchDirection. The search direction. Can be one of these XlSearchDirection constants:




Optional Object. True to make the search case sensitive. The default value is False.


Optional Object. Used only if you’ve selected or installed double-byte language support. True to have double-byte characters match only double-byte characters; False to have double-byte characters match their single-byte equivalents.


Optional Object. The search format.

This method returns Nothing if no match is found.

This method doesn’t affect the selection or the active cell.

The settings for LookIn, LookAt, SearchOrder, and MatchByte are saved each time you use this method. If you don’t specify values for these arguments the next time you call the method, the saved values are used. Setting these arguments changes the settings in the Find dialog box, and changing the settings in the Find dialog box changes the saved values that are used if you omit the arguments. To avoid problems, set these arguments explicitly each time you use this method.

You can use the FindNext and FindPrevious methods to repeat the search.

When the search reaches the end of the specified search range, it wraps around to the beginning of the range. To stop a search when this wraparound occurs, save the address of the first found cell, and then test each successive found-cell address against this saved address.

To find cells that match more complicated patterns, use a For Each...Next statement with the Like operator.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms