Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi all,
Wonder if anyone can help me. Using Excel 2007 and the SumIfs function. I have my sum range, and my first criteria range =SUMIFS($I$2:$I$2000,$B$2:$B$2000,"1", i.e. sum anything in column I that equals to a one from column B. But for my second criteria range $D$2:$D$2000,the value can be one of 14 possibilities 6400, 6401, 6402 up to 6412 as well as anything beginning with KA. So basically I'm trying to find out if there's a way to sum something if it equals a 1 in the one column, and then a range of possibilities in another column after that. Is this possible? Any help would be appreciated! Thanks, Mike |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Really "1"?
=SUMPRODUCT(--($B$2:$B$20="1"),--(ISNUMBER(MATCH($D$2:$D$20,{640,641},0))),$I$2:$I$ 20) -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "mike_vr" wrote in message ... Hi all, Wonder if anyone can help me. Using Excel 2007 and the SumIfs function. I have my sum range, and my first criteria range =SUMIFS($I$2:$I$2000,$B$2:$B$2000,"1", i.e. sum anything in column I that equals to a one from column B. But for my second criteria range $D$2:$D$2000,the value can be one of 14 possibilities 6400, 6401, 6402 up to 6412 as well as anything beginning with KA. So basically I'm trying to find out if there's a way to sum something if it equals a 1 in the one column, and then a range of possibilities in another column after that. Is this possible? Any help would be appreciated! Thanks, Mike |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I now thin it should be
=SUMPRODUCT(--($B$2:$B$20=1),--(ISNUMBER(MATCH($D$2:$D$20,{640,641},0))),$I$2:$I$ 20) -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "mike_vr" wrote in message ... Hi all, Wonder if anyone can help me. Using Excel 2007 and the SumIfs function. I have my sum range, and my first criteria range =SUMIFS($I$2:$I$2000,$B$2:$B$2000,"1", i.e. sum anything in column I that equals to a one from column B. But for my second criteria range $D$2:$D$2000,the value can be one of 14 possibilities 6400, 6401, 6402 up to 6412 as well as anything beginning with KA. So basically I'm trying to find out if there's a way to sum something if it equals a 1 in the one column, and then a range of possibilities in another column after that. Is this possible? Any help would be appreciated! Thanks, Mike |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Bob,
Thanks for the help so far. The Sumproduct works perfectly for the range of numbers (6400 - 6414), but then there is the curve ball of anything starting with KA (this is then usually followed by a five digit number eg KA20005 or KA20061 etc). I've tried using KA* after the 641 =SUMPRODUCT(--($B$2:$B$20=1),--(ISNUMBER(MATCH($D$2:$D$20,{640,641,KA*},0))),$I$2 :$I$20) But this comes back with an error message Is there a way to also select those things starting with KA? If it helps, the remainder of choices are all text. Thanks again, Mike "Bob Phillips" wrote: I now thin it should be =SUMPRODUCT(--($B$2:$B$20=1),--(ISNUMBER(MATCH($D$2:$D$20,{640,641},0))),$I$2:$I$ 20) -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "mike_vr" wrote in message ... Hi all, Wonder if anyone can help me. Using Excel 2007 and the SumIfs function. I have my sum range, and my first criteria range =SUMIFS($I$2:$I$2000,$B$2:$B$2000,"1", i.e. sum anything in column I that equals to a one from column B. But for my second criteria range $D$2:$D$2000,the value can be one of 14 possibilities 6400, 6401, 6402 up to 6412 as well as anything beginning with KA. So basically I'm trying to find out if there's a way to sum something if it equals a 1 in the one column, and then a range of possibilities in another column after that. Is this possible? Any help would be appreciated! Thanks, Mike |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You can add an OR condition.
=SUMPRODUCT(--($B$2:$B$2000=1),--((($D$2:$D$2000=6400)*($D$2:$D$2000<=6414))+(LEFT ($D$2:$D$2000,2)="KA")),$I$2:$I$2000) This alos gives another way of testing the array of values. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "mike_vr" wrote in message ... Hi Bob, Thanks for the help so far. The Sumproduct works perfectly for the range of numbers (6400 - 6414), but then there is the curve ball of anything starting with KA (this is then usually followed by a five digit number eg KA20005 or KA20061 etc). I've tried using KA* after the 641 =SUMPRODUCT(--($B$2:$B$20=1),--(ISNUMBER(MATCH($D$2:$D$20,{640,641,KA*},0))),$I$2 :$I$20) But this comes back with an error message Is there a way to also select those things starting with KA? If it helps, the remainder of choices are all text. Thanks again, Mike "Bob Phillips" wrote: I now thin it should be =SUMPRODUCT(--($B$2:$B$20=1),--(ISNUMBER(MATCH($D$2:$D$20,{640,641},0))),$I$2:$I$ 20) -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "mike_vr" wrote in message ... Hi all, Wonder if anyone can help me. Using Excel 2007 and the SumIfs function. I have my sum range, and my first criteria range =SUMIFS($I$2:$I$2000,$B$2:$B$2000,"1", i.e. sum anything in column I that equals to a one from column B. But for my second criteria range $D$2:$D$2000,the value can be one of 14 possibilities 6400, 6401, 6402 up to 6412 as well as anything beginning with KA. So basically I'm trying to find out if there's a way to sum something if it equals a 1 in the one column, and then a range of possibilities in another column after that. Is this possible? Any help would be appreciated! Thanks, Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel | |||
create links to check boxes marked "good" fair"and "bad" | Excel Worksheet Functions | |||
Complex if test program possible? If "value" "value", paste "value" in another cell? | Excel Discussion (Misc queries) | |||
Insert "-" in text "1234567890" to have a output like this"123-456-7890" | Excel Discussion (Misc queries) |