Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
match
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
match
first, thanks for your help.
I took off the .value, then the range, then the quotes, nothing worked. Did it work for you? peter "Tim Williams" wrote: 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
match
Countif only works on a range, not an array
foundcount = Application.CountIf(Range("group_code"), "WVJ") should give you the correct count of cells that contain only the characters WVJ in that order. You are correct that match only works on a single column or single row. -- Regards, Tom Ogilvy "peter" wrote: first, thanks for your help. I took off the .value, then the range, then the quotes, nothing worked. Did it work for you? peter "Tim Williams" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Match formula to match values in multiple columns | Excel Discussion (Misc queries) | |||
Lookup Formula: Return 1st match, then 2nd match, then 3rd match | Excel Discussion (Misc queries) | |||
index(match) Wind Uplift Calculations (match four conditions) | Excel Worksheet Functions | |||
MATCH Multiple Criteria & Return Previous / Penultimate Match | Excel Worksheet Functions | |||
Lookup? Match? pulling rows from one spreadsheet to match a text f | Excel Worksheet Functions |