Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default Using Sumifs combined with an "Or"

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Using Sumifs combined with an "Or"

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Using Sumifs combined with an "Or"

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default Using Sumifs combined with an "Or"

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Using Sumifs combined with an "Or"

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
create links to check boxes marked "good" fair"and "bad" pjb Excel Worksheet Functions 3 April 20th 06 02:17 AM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM


All times are GMT +1. The time now is 10:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"