Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Can I use wildcard characters in array formulas
I am using Excel 2007 and I am trying to use an array formula to search based
on two criteria: the year, and an account number. The array contains account numbers in the format #.###.## and #.###.##.#. I want to sum only amounts where the account number matches the first format and exclude those that match the second format. For example, I may have account number 1.111.1, which I would include, but account number 1.111.1.1 I would not. The array fomula I have created, {=SUM(IF((YEAR($B$2:$B$5294)=G$1)*($A$2:$A$5294="* .*.*"),$D$2:$D$5294,0))} treats all results of the test for the account number as if they are false and returns 0, even though I know that there are true results in the array. As I have used this logic many times in the past, the only problem I could see is the use of the wildcard characters. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Can I use wildcard characters in array formulas
I'm assuming the account numbers are TEXT entries. There may be a better way
but this works: =SUMPRODUCT(--(LEN(A2:A10)-LEN(SUBSTITUTE(A2:A10,".",""))=2),--(YEAR(B2:B10)=G1),D2:D10) The criteria is include entries with 2 dots. -- Biff Microsoft Excel MVP "devobrown" wrote in message ... I am using Excel 2007 and I am trying to use an array formula to search based on two criteria: the year, and an account number. The array contains account numbers in the format #.###.## and #.###.##.#. I want to sum only amounts where the account number matches the first format and exclude those that match the second format. For example, I may have account number 1.111.1, which I would include, but account number 1.111.1.1 I would not. The array fomula I have created, {=SUM(IF((YEAR($B$2:$B$5294)=G$1)*($A$2:$A$5294="* .*.*"),$D$2:$D$5294,0))} treats all results of the test for the account number as if they are false and returns 0, even though I know that there are true results in the array. As I have used this logic many times in the past, the only problem I could see is the use of the wildcard characters. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sumproduct with wildcard characters? | Excel Discussion (Misc queries) | |||
wildcard characters | Excel Discussion (Misc queries) | |||
HELP: Wildcard Characters | Excel Discussion (Misc queries) | |||
WildCard Characters | Excel Worksheet Functions | |||
Using wild card characters in array formulas | Excel Worksheet Functions |