Thread: Caontains.
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
chad chad is offline
external usenet poster
 
Posts: 273
Default Caontains.

A mechanical solution that checks an input range is as follows.

Function Row_Match(Ip_Range As range, MatchCell As range) As Integer
Dim i As Integer, j As Integer

For j = 1 To Ip_Range.Columns.count
For i = 1 To Ip_Range.Rows.count
If Ip_Range.Cells(i, j) = MatchCell.Value Then
Row_Match = i
Exit For
End If
Next i
Next j

End Function

Ip_Range is the range to be checked. MatchCell is the cell that contains
what you want to find in the range.


"Tom" wrote:

Hello again,

how can I check it if hole column contains string which I am lookig for.

for example:
mystring = "test2005"
if mystring in column A give me number of this row

thanks tomas