Thread: match
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams Tim Williams is offline
external usenet poster
 
Posts: 1,588
Default match

Try dropping the ".value" from your countif example.

--
Tim Williams
Palo Alto, CA


"peter" wrote in message ...
Hi,
I'm trying to test to see if a string exists in a range.
foundmatch = Application.WorksheetFunction.Match("wjv",
Range("staff").Value, 0)
works if range staff is a single column or row, if the range is a matrix it
returns 0
I tried useing
foundcount =
Application.WorksheetFunction.CountIf(Range("group _code").Value, "WVJ")
where group_code is more than a single row or column, it also returns 0.

Any ideas would be greatly appreciated.

peter