Re: match



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

--
Tim Williams
Palo Alto, CA


"peter" <peter@xxxxxxxxxxxxxxxxxxxxx> wrote in message news:E5F54A49-0597-448C-A6DF-0E8BA12B6155@xxxxxxxxxxxxxxxx
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


.