brettthomas
New Member
- Joined
- Jun 28, 2011
- Messages
- 3
Hello,
I am trying to do what I thought would be extremely simple: Find text in column D, and for each "true", sum it's respective values in column E. In other words, I'm doing a simple =SUMIF(D2:D44,L10,E2:E44), but instead of matching the exact contents of L10, I need it to find the contents of L10 WITHIN column D (ie: find "I am tearing" in "I am tearing my hair out"). I have no idea why the following won't work. It gives a value error if entered normally, or evaluates incorrectly to "0" if entered as an array formula:
=SUMPRODUCT(IF(ISNUMBER(SEARCH(L10,D2:D44)),1,0),E2:E44)
Same thing here:
=SUMPRODUCT(--(ISNUMBER(SEARCH(L10,D2:D44))),E2:E44)
{=IF(ISNUMBER(SEARCH(L10,D2:D65)),1,0)} evaluates correctly to an array {0,0,0,1,0,0,1,1,0,1,0,0,etc}, and E2:E44 is an array, so why can't Sumproduct multiply and sum these arrays? There are currently no blank cells in either column, but it will eventually need to be able to handle (meaning ignore) blank cells. Any ideas???
Thanks in advance!
-Brett
I am trying to do what I thought would be extremely simple: Find text in column D, and for each "true", sum it's respective values in column E. In other words, I'm doing a simple =SUMIF(D2:D44,L10,E2:E44), but instead of matching the exact contents of L10, I need it to find the contents of L10 WITHIN column D (ie: find "I am tearing" in "I am tearing my hair out"). I have no idea why the following won't work. It gives a value error if entered normally, or evaluates incorrectly to "0" if entered as an array formula:
=SUMPRODUCT(IF(ISNUMBER(SEARCH(L10,D2:D44)),1,0),E2:E44)
Same thing here:
=SUMPRODUCT(--(ISNUMBER(SEARCH(L10,D2:D44))),E2:E44)
{=IF(ISNUMBER(SEARCH(L10,D2:D65)),1,0)} evaluates correctly to an array {0,0,0,1,0,0,1,1,0,1,0,0,etc}, and E2:E44 is an array, so why can't Sumproduct multiply and sum these arrays? There are currently no blank cells in either column, but it will eventually need to be able to handle (meaning ignore) blank cells. Any ideas???
Thanks in advance!
-Brett