Hello,

I have a set of data that has a label in column A the sales in column
B, C & D:

Column A Column B Column C
Joel 500 677
Joel 575 752
Joel 650 827
Claudia 725 902
Tarzan 800 968

I'd like to run SUMIF where the "Range" is column A, the "Criteria" is
Joel, and the "Sum_Range" is B:C but when I use SUMIF(A:A,"Joel",B:C)
I only get the sum of column B which is 1,725.

Can someone hook me up with a formula that can sum both column B & C
in this situation.

Thanks, in advance

Daniel

Re: Sumif with multiple columns in sum_range by jarochaox

jarochaox
Fri Mar 14 13:18:45 CDT 2008

On Mar 14, 11:10=A0am, dza7 <dvpe...@gmail.com> wrote:
> Hello,
>
> I have a set of data that has a label in column A the sales in column
> B, C & D:
>
> Column A =A0 =A0 =A0 =A0Column B =A0 =A0 =A0 =A0Column C
> Joel =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0500 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0677
> Joel =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0575 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0752
> Joel =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0650 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0827
> Claudia =A0 =A0 =A0 =A0 =A0 725 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0902
> Tarzan =A0 =A0 =A0 =A0 =A0 =A0800 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0968
>
> I'd like to run SUMIF where the "Range" is column A, the "Criteria" is
> Joel, and the "Sum_Range" is B:C but when I use SUMIF(A:A,"Joel",B:C)
> I only get the sum of column B which is 1,725.
>
> Can someone hook me up with a formula that can sum both column B & C
> in this situation.
>
> Thanks, in advance
>
> Daniel

something something


Re: Sumif with multiple columns in sum_range by Ron

Ron
Fri Mar 14 13:14:24 CDT 2008

Try this approach:

=SUMPRODUCT((A2:A10="Joel")*B2:C10)

Adjust range references to suit your situation.

Is that something you can work with?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"dza7" <dvpetta@gmail.com> wrote in message
news:e3263457-62c1-4b93-b3e5-d109d93e1916@s8g2000prg.googlegroups.com...
> Hello,
>
> I have a set of data that has a label in column A the sales in column
> B, C & D:
>
> Column A Column B Column C
> Joel 500 677
> Joel 575 752
> Joel 650 827
> Claudia 725 902
> Tarzan 800 968
>
> I'd like to run SUMIF where the "Range" is column A, the "Criteria" is
> Joel, and the "Sum_Range" is B:C but when I use SUMIF(A:A,"Joel",B:C)
> I only get the sum of column B which is 1,725.
>
> Can someone hook me up with a formula that can sum both column B & C
> in this situation.
>
> Thanks, in advance
>
> Daniel



Re: Sumif with multiple columns in sum_range by dza7

dza7
Fri Mar 14 13:22:46 CDT 2008

On Mar 14, 11:14 am, "Ron Coderre" <ronREMOVETHIScode...@bigfoot.com>
wrote:
> Try this approach:
>
> =SUMPRODUCT((A2:A10="Joel")*B2:C10)
>
> Adjust range references to suit your situation.
>
> Is that something you can work with?
> Post back if you have more questions.
> --------------------------
>
> Regards,
>
> Ron
> Microsoft MVP (Excel)
> (XL2003, Win XP)
>
> "dza7" <dvpe...@gmail.com> wrote in message
>
> news:e3263457-62c1-4b93-b3e5-d109d93e1916@s8g2000prg.googlegroups.com...
>
> > Hello,
>
> > I have a set of data that has a label in column A the sales in column
> > B, C & D:
>
> > Column A Column B Column C
> > Joel 500 677
> > Joel 575 752
> > Joel 650 827
> > Claudia 725 902
> > Tarzan 800 968
>
> > I'd like to run SUMIF where the "Range" is column A, the "Criteria" is
> > Joel, and the "Sum_Range" is B:C but when I use SUMIF(A:A,"Joel",B:C)
> > I only get the sum of column B which is 1,725.
>
> > Can someone hook me up with a formula that can sum both column B & C
> > in this situation.
>
> > Thanks, in advance
>
> > Daniel

Perfect, thank you very much!

Re: Sumif with multiple columns in sum_range by Ron

Ron
Fri Mar 14 13:24:27 CDT 2008

You're very welcome....I'm glad I could help.

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"dza7" <dvpetta@gmail.com> wrote in message
news:ee1d8a5f-bbdd-4746-ba84-c90915ffd4aa@s12g2000prg.googlegroups.com...
> On Mar 14, 11:14 am, "Ron Coderre" <ronREMOVETHIScode...@bigfoot.com>
> wrote:
>> Try this approach:
>>
>> =SUMPRODUCT((A2:A10="Joel")*B2:C10)
>>
>> Adjust range references to suit your situation.
>>
>> Is that something you can work with?
>> Post back if you have more questions.
>> --------------------------
>>
>> Regards,
>>
>> Ron
>> Microsoft MVP (Excel)
>> (XL2003, Win XP)
>>
>> "dza7" <dvpe...@gmail.com> wrote in message
>>
>> news:e3263457-62c1-4b93-b3e5-d109d93e1916@s8g2000prg.googlegroups.com...
>>
>> > Hello,
>>
>> > I have a set of data that has a label in column A the sales in column
>> > B, C & D:
>>
>> > Column A Column B Column C
>> > Joel 500 677
>> > Joel 575 752
>> > Joel 650 827
>> > Claudia 725 902
>> > Tarzan 800 968
>>
>> > I'd like to run SUMIF where the "Range" is column A, the "Criteria" is
>> > Joel, and the "Sum_Range" is B:C but when I use SUMIF(A:A,"Joel",B:C)
>> > I only get the sum of column B which is 1,725.
>>
>> > Can someone hook me up with a formula that can sum both column B & C
>> > in this situation.
>>
>> > Thanks, in advance
>>
>> > Daniel
>
> Perfect, thank you very much!



Re: Sumif with multiple columns in sum_range by gavin

gavin
Fri Mar 14 15:10:09 CDT 2008


"Ron Coderre" <ronREMOVETHIScoderre@bigfoot.com> wrote in message
news:u%23XBL%23fhIHA.4712@TK2MSFTNGP04.phx.gbl...
> Try this approach:
>
> =SUMPRODUCT((A2:A10="Joel")*B2:C10)

I can never get my head round the SUMPRODUCT function. Can anyone explain in
very simple terms(!!!) what it does :-)



Re: Sumif with multiple columns in sum_range by Dave

Dave
Fri Mar 14 15:34:29 CDT 2008

Bob Phillips explains =sumproduct() in much more detail here:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

gavin wrote:
>
> "Ron Coderre" <ronREMOVETHIScoderre@bigfoot.com> wrote in message
> news:u%23XBL%23fhIHA.4712@TK2MSFTNGP04.phx.gbl...
> > Try this approach:
> >
> > =SUMPRODUCT((A2:A10="Joel")*B2:C10)
>
> I can never get my head round the SUMPRODUCT function. Can anyone explain in
> very simple terms(!!!) what it does :-)

--

Dave Peterson

Re: Sumif with multiple columns in sum_range by David

David
Fri Mar 14 15:38:51 CDT 2008

For a simple description, type the word SUMPRODUCT into Excel help. For
more detail, type the words SUMPRODUCT and Excel into Google.
--
David Biddulph

"gavin" <theslider@cosmicdancer.freeserve.co.uk> wrote in message
news:BYACj.91354$3y2.58607@fe08.news.easynews.com...
>
> "Ron Coderre" <ronREMOVETHIScoderre@bigfoot.com> wrote in message
> news:u%23XBL%23fhIHA.4712@TK2MSFTNGP04.phx.gbl...
>> Try this approach:
>>
>> =SUMPRODUCT((A2:A10="Joel")*B2:C10)
>
> I can never get my head round the SUMPRODUCT function. Can anyone explain
> in very simple terms(!!!) what it does :-)
>



Re: Sumif with multiple columns in sum_range by Ron

Ron
Fri Mar 14 15:50:44 CDT 2008

I see that Dave Peterson gave you the xldynamic link, which is very
comprehensive.

To augment that a bit, I'll describe the SUMPRODUCT functionality
as it applies to formula in this thread.

Let's see if this helps:

SUMPRODUCT was *designed* to multiply two or more same-size
ranges of cells and sum the products.

Example (in cells A1:B4):
Sale Rate
100 0.10
200 0.15
300 0.20

The commission would be the sum of each Sale x Rate.
+(100 x 0.10)
+(200 x 0.15)
+(300 x 0.20)

In this instance, the total happens to be 100.

The SUMPRODUCT representation of that could be:
=SUMPRODUCT(A2:A4,B2:B4)

But SUMPRODUCT has an alternate structure, too:
=SUMPRODUCT((A2:A4)*(B2:B4))

(Sometimes the second one works where the
first one fails and vice versa)

The function multiplies the
A2 x B2 calcs 10.....adds to the total
A3 x B3 calcs 30.....adds to the total
A4 x B4 calcs 60.....adds to the total
Commission = 100 (10+30+60)

*********************************
Before continuing...Let's talk a bit about Boolean Values.
That's a fancy term for True/False values.

This formula:
A1: =(5=5)
returns TRUE....5 DOES equal 5

and
This formula:
A2: =(5=2)
returns FALSE....5 does NOT equal 2

As such, TRUE and FALSE...are treated as WORDS by Excel.
B1: =A1....returns TRUE
and
B2: =A2....returns FALSE

BUT...When you apply an arithmetic operator (+, -, *, /)
to a Boolean Value Excel converts TRUE to 1 and FALSE to 0.

So...
B1: =A1*1.....returns 1, instead of TRUE.
B2: =A2*1.....returns 0, instead of FALSE.

Actually, multiplying by any number converts
TRUE to 1 and FALSE to 0.

So...this would happen, too:
B1: =A1*10.....returns 10.
B2: =A2*10.....returns 0.

**********************************
We'll exploit that feature in SUMPRODUCT.....

In this formula:
=SUMPRODUCT((A2:A10="Joel")*B2:C10)

This expression:
(A2:A10="Joel")....returns a series of TRUE/FALSE values
depending on whether the cell equals "Joel" or not.
and
B2:C10 contains NUMBERS!
SO..
Each TRUE when multiplied by its associated NUMBER
returns that number.

Each FALSE when multiplied by its associated NUMBER
returns converts to a zero...0 x number = 0.

SUMPRODUCT returns the sum of all those results
which is the sum of all combinations where
Col_A="Joel"

Experiment with simple examples until you get
comfortable with the way it works.

I hope that helps.
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)



"gavin" <theslider@cosmicdancer.freeserve.co.uk> wrote in message
news:BYACj.91354$3y2.58607@fe08.news.easynews.com...
>
> "Ron Coderre" <ronREMOVETHIScoderre@bigfoot.com> wrote in message
> news:u%23XBL%23fhIHA.4712@TK2MSFTNGP04.phx.gbl...
>> Try this approach:
>>
>> =SUMPRODUCT((A2:A10="Joel")*B2:C10)
>
> I can never get my head round the SUMPRODUCT function. Can anyone explain
> in very simple terms(!!!) what it does :-)
>




Re: Sumif with multiple columns in sum_range by gavin

gavin
Fri Mar 14 17:56:24 CDT 2008


"Ron Coderre" <ronREMOVETHIScoderre@bigfoot.com> wrote in message
news:OfNleVhhIHA.2540@TK2MSFTNGP05.phx.gbl...
>I see that Dave Peterson gave you the xldynamic link, which is very
> comprehensive.
>
> To augment that a bit, I'll describe the SUMPRODUCT functionality
> as it applies to formula in this thread.
>
> Let's see if this helps:
>
> SUMPRODUCT was *designed* to multiply two or more same-size
> ranges of cells and sum the products.
>
> Example (in cells A1:B4):
> Sale Rate
> 100 0.10
> 200 0.15
> 300 0.20
>
> The commission would be the sum of each Sale x Rate.
> +(100 x 0.10)
> +(200 x 0.15)
> +(300 x 0.20)
>
> In this instance, the total happens to be 100.
>
> The SUMPRODUCT representation of that could be:
> =SUMPRODUCT(A2:A4,B2:B4)
>
> But SUMPRODUCT has an alternate structure, too:
> =SUMPRODUCT((A2:A4)*(B2:B4))
>
> (Sometimes the second one works where the
> first one fails and vice versa)
>
> The function multiplies the
> A2 x B2 calcs 10.....adds to the total
> A3 x B3 calcs 30.....adds to the total
> A4 x B4 calcs 60.....adds to the total
> Commission = 100 (10+30+60)
>
> *********************************
> Before continuing...Let's talk a bit about Boolean Values.
> That's a fancy term for True/False values.
>
> This formula:
> A1: =(5=5)
> returns TRUE....5 DOES equal 5
>
> and
> This formula:
> A2: =(5=2)
> returns FALSE....5 does NOT equal 2
>
> As such, TRUE and FALSE...are treated as WORDS by Excel.
> B1: =A1....returns TRUE
> and
> B2: =A2....returns FALSE
>
> BUT...When you apply an arithmetic operator (+, -, *, /)
> to a Boolean Value Excel converts TRUE to 1 and FALSE to 0.
>
> So...
> B1: =A1*1.....returns 1, instead of TRUE.
> B2: =A2*1.....returns 0, instead of FALSE.
>
> Actually, multiplying by any number converts
> TRUE to 1 and FALSE to 0.
>
> So...this would happen, too:
> B1: =A1*10.....returns 10.
> B2: =A2*10.....returns 0.
>
> **********************************
> We'll exploit that feature in SUMPRODUCT.....
>
> In this formula:
> =SUMPRODUCT((A2:A10="Joel")*B2:C10)
>
> This expression:
> (A2:A10="Joel")....returns a series of TRUE/FALSE values
> depending on whether the cell equals "Joel" or not.
> and
> B2:C10 contains NUMBERS!
> SO..
> Each TRUE when multiplied by its associated NUMBER
> returns that number.
>
> Each FALSE when multiplied by its associated NUMBER
> returns converts to a zero...0 x number = 0.
>
> SUMPRODUCT returns the sum of all those results
> which is the sum of all combinations where
> Col_A="Joel"
>
> Experiment with simple examples until you get
> comfortable with the way it works.
>
> I hope that helps.
> Post back if you have more questions.
> --------------------------
>
> Regards,
>
> Ron
> Microsoft MVP (Excel)
> (XL2003, Win XP)


Oh no! I didn't understand a word of that - and I thought I was reasonably
intelligent :-(



Re: Sumif with multiple columns in sum_range by AFJr

AFJr
Wed Mar 26 13:16:10 CDT 2008

Hi Ron,

I wanted to thank you for your GREAT explanation:

>**********************************
>We'll exploit that feature in SUMPRODUCT.....
>
>In this formula:
>=SUMPRODUCT((A2:A10="Joel")*B2:C10)
>
>This expression:
>(A2:A10="Joel")....returns a series of TRUE/FALSE values
>depending on whether the cell equals "Joel" or not.
>and
>B2:C10 contains NUMBERS!
>SO..
>Each TRUE when multiplied by its associated NUMBER
>returns that number.
>
>Each FALSE when multiplied by its associated NUMBER
>returns converts to a zero...0 x number = 0.
>
>SUMPRODUCT returns the sum of all those results
>which is the sum of all combinations where
>Col_A="Joel"

My question is this, I'm using Excel97, does this function work in this
version?

My formula
=SUMPRODUCT(($B$21:$B$62="C")*$Q$21:$S$62)
is not working. I thought I understood exactly what you were saying, maybe
not.....


--
TIA

AFJr


Re: Sumif with multiple columns in sum_range by Ron

Ron
Wed Mar 26 13:38:52 CDT 2008

Hi, AF Jr

If you're not getting a #NAME! error,
then Excel 97 has the SUMPRODUCT
function.

There are 2 variations of the structure.
If this one doesn't work:
=SUMPRODUCT(($B$21:$B$62="C")*$Q$21:$S$62)

Try this one:
=SUMPRODUCT(--($B$21:$B$62="C"),$Q$21:$S$62)

Does that help?
Post back if you have more questions.

Oh, and thanks for the feedback on the explanation.
Much appreciated.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)




"AFJr" <AFJr@discussions.microsoft.com> wrote in message
news:774723DC-7F3B-4F6C-8AA6-AE7E13707337@microsoft.com...
> Hi Ron,
>
> I wanted to thank you for your GREAT explanation:
>
>>**********************************
>>We'll exploit that feature in SUMPRODUCT.....
>>
>>In this formula:
>>=SUMPRODUCT((A2:A10="Joel")*B2:C10)
>>
>>This expression:
>>(A2:A10="Joel")....returns a series of TRUE/FALSE values
>>depending on whether the cell equals "Joel" or not.
>>and
>>B2:C10 contains NUMBERS!
>>SO..
>>Each TRUE when multiplied by its associated NUMBER
>>returns that number.
>>
>>Each FALSE when multiplied by its associated NUMBER
>>returns converts to a zero...0 x number = 0.
>>
>>SUMPRODUCT returns the sum of all those results
>>which is the sum of all combinations where
>>Col_A="Joel"
>
> My question is this, I'm using Excel97, does this function work in this
> version?
>
> My formula
> =SUMPRODUCT(($B$21:$B$62="C")*$Q$21:$S$62)
> is not working. I thought I understood exactly what you were saying, maybe
> not.....
>
>
> --
> TIA
>
> AFJr
>




Re: Sumif with multiple columns in sum_range by AFJr

AFJr
Wed Mar 26 14:09:10 CDT 2008

Hi Ron,

Thanks for your quick response.

I'm getting a #VALUE! error.

Sorry for not posting that earlier. I'm getting this error using both
structures of the formula. I'm stumped, any ideas?

One more question, the "--" =SUMPRODUCT(--($B$21:$B$62="C"),$Q$21:$S$62)
what does that mean? I've tried it with and w/o that, still no luck.

--
TIA

AFJr


"Ron Coderre" wrote:

> Hi, AF Jr
>
> If you're not getting a #NAME! error,
> then Excel 97 has the SUMPRODUCT
> function.
>
> There are 2 variations of the structure.
> If this one doesn't work:
> =SUMPRODUCT(($B$21:$B$62="C")*$Q$21:$S$62)
>
> Try this one:
> =SUMPRODUCT(--($B$21:$B$62="C"),$Q$21:$S$62)
>
> Does that help?
> Post back if you have more questions.
>
> Oh, and thanks for the feedback on the explanation.
> Much appreciated.
> --------------------------
>
> Regards,
>
> Ron
> Microsoft MVP (Excel)
> (XL2003, Win XP)
>
>
>
>
> "AFJr" <AFJr@discussions.microsoft.com> wrote in message
> news:774723DC-7F3B-4F6C-8AA6-AE7E13707337@microsoft.com...
> > Hi Ron,
> >
> > I wanted to thank you for your GREAT explanation:
> >
> >>**********************************
> >>We'll exploit that feature in SUMPRODUCT.....
> >>
> >>In this formula:
> >>=SUMPRODUCT((A2:A10="Joel")*B2:C10)
> >>
> >>This expression:
> >>(A2:A10="Joel")....returns a series of TRUE/FALSE values
> >>depending on whether the cell equals "Joel" or not.
> >>and
> >>B2:C10 contains NUMBERS!
> >>SO..
> >>Each TRUE when multiplied by its associated NUMBER
> >>returns that number.
> >>
> >>Each FALSE when multiplied by its associated NUMBER
> >>returns converts to a zero...0 x number = 0.
> >>
> >>SUMPRODUCT returns the sum of all those results
> >>which is the sum of all combinations where
> >>Col_A="Joel"
> >
> > My question is this, I'm using Excel97, does this function work in this
> > version?
> >
> > My formula
> > =SUMPRODUCT(($B$21:$B$62="C")*$Q$21:$S$62)
> > is not working. I thought I understood exactly what you were saying, maybe
> > not.....
> >
> >
> > --
> > TIA
> >
> > AFJr
> >
>
>
>
>

Re: Sumif with multiple columns in sum_range by Ron

Ron
Wed Mar 26 14:19:27 CDT 2008

The Double-Unary (--) forces a conversion of TRUE/FALSE values to numbers.
--TRUE = 1
--FALSE = 0

so...--{TRUE, TRUE, FALSE}...becomes {1,1,0}

You could also multiply boolean values to the same effect:
1*TRUE = 1
1*FALSE = 0

But, the Dbl-Minus indicates to knowledgable users that
a numeric conversion is intended, versus a calculation.

Regarding your #VALUE! error....scan the referenced data and see if
there are any errors or irregularities in it.

Does that help?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)





"AFJr" <AFJr@discussions.microsoft.com> wrote in message
news:80BD6330-4621-42B7-A101-C8C3ADABFAF1@microsoft.com...
> Hi Ron,
>
> Thanks for your quick response.
>
> I'm getting a #VALUE! error.
>
> Sorry for not posting that earlier. I'm getting this error using both
> structures of the formula. I'm stumped, any ideas?
>
> One more question, the "--" =SUMPRODUCT(--($B$21:$B$62="C"),$Q$21:$S$62)
> what does that mean? I've tried it with and w/o that, still no luck.
>
> --
> TIA
>
> AFJr
>
>
> "Ron Coderre" wrote:
>
>> Hi, AF Jr
>>
>> If you're not getting a #NAME! error,
>> then Excel 97 has the SUMPRODUCT
>> function.
>>
>> There are 2 variations of the structure.
>> If this one doesn't work:
>> =SUMPRODUCT(($B$21:$B$62="C")*$Q$21:$S$62)
>>
>> Try this one:
>> =SUMPRODUCT(--($B$21:$B$62="C"),$Q$21:$S$62)
>>
>> Does that help?
>> Post back if you have more questions.
>>
>> Oh, and thanks for the feedback on the explanation.
>> Much appreciated.
>> --------------------------
>>
>> Regards,
>>
>> Ron
>> Microsoft MVP (Excel)
>> (XL2003, Win XP)
>>
>>
>>
>>
>> "AFJr" <AFJr@discussions.microsoft.com> wrote in message
>> news:774723DC-7F3B-4F6C-8AA6-AE7E13707337@microsoft.com...
>> > Hi Ron,
>> >
>> > I wanted to thank you for your GREAT explanation:
>> >
>> >>**********************************
>> >>We'll exploit that feature in SUMPRODUCT.....
>> >>
>> >>In this formula:
>> >>=SUMPRODUCT((A2:A10="Joel")*B2:C10)
>> >>
>> >>This expression:
>> >>(A2:A10="Joel")....returns a series of TRUE/FALSE values
>> >>depending on whether the cell equals "Joel" or not.
>> >>and
>> >>B2:C10 contains NUMBERS!
>> >>SO..
>> >>Each TRUE when multiplied by its associated NUMBER
>> >>returns that number.
>> >>
>> >>Each FALSE when multiplied by its associated NUMBER
>> >>returns converts to a zero...0 x number = 0.
>> >>
>> >>SUMPRODUCT returns the sum of all those results
>> >>which is the sum of all combinations where
>> >>Col_A="Joel"
>> >
>> > My question is this, I'm using Excel97, does this function work in this
>> > version?
>> >
>> > My formula
>> > =SUMPRODUCT(($B$21:$B$62="C")*$Q$21:$S$62)
>> > is not working. I thought I understood exactly what you were saying,
>> > maybe
>> > not.....
>> >
>> >
>> > --
>> > TIA
>> >
>> > AFJr
>> >
>>
>>
>>
>>



Re: Sumif with multiple columns in sum_range by AFJr

AFJr
Thu Mar 27 08:02:00 CDT 2008

Hi Ron,

Thanks for sticking with me through this. I've checked the data for errors.
I'm not sure if this is a problem or not.

The targeted cells in my formula:
=SUMPRODUCT(($B$21:$B$62="C")*$Q$21:$S$62)

B21:B62 are just text selected from a list.

Q21:S62 contain formulas, columns Q & R formula is: =IF($E:$E=0,"",$E:$E*0)
{the zero that is multiplied could be a value or zero}

column S is: =IF($E:$E=0,"",(Q22+R22)*0.15)
(the data in column "E" is a number that represents a "Qty" multiplier)

So when the SUMPRODUCT function is executed it looks at column B to see if
the value ="C" and produces a "1" if it is(True). If it evaluates to "1",
columns Q:S formula's are executed and added together. Being that a zero
could result in the the formula's in columns Q:S I suspect this is giving me
my #VALUE! error. Multiplying any number by zero results in zero but, why
would this be a problem? Maybe its the way excel evaluates it. If so, I've
got to come up with another way to do this.

Does this make sense to you? Any other suggestions?

--
TIA

AFJr


"Ron Coderre" wrote:

> The Double-Unary (--) forces a conversion of TRUE/FALSE values to numbers.
> --TRUE = 1
> --FALSE = 0
>
> so...--{TRUE, TRUE, FALSE}...becomes {1,1,0}
>
> You could also multiply boolean values to the same effect:
> 1*TRUE = 1
> 1*FALSE = 0
>
> But, the Dbl-Minus indicates to knowledgable users that
> a numeric conversion is intended, versus a calculation.
>
> Regarding your #VALUE! error....scan the referenced data and see if
> there are any errors or irregularities in it.
>
> Does that help?
> --------------------------
>
> Regards,
>
> Ron
> Microsoft MVP (Excel)
> (XL2003, Win XP)
>
>
>
>
>
> "AFJr" <AFJr@discussions.microsoft.com> wrote in message
> news:80BD6330-4621-42B7-A101-C8C3ADABFAF1@microsoft.com...
> > Hi Ron,
> >
> > Thanks for your quick response.
> >
> > I'm getting a #VALUE! error.
> >
> > Sorry for not posting that earlier. I'm getting this error using both
> > structures of the formula. I'm stumped, any ideas?
> >
> > One more question, the "--" =SUMPRODUCT(--($B$21:$B$62="C"),$Q$21:$S$62)
> > what does that mean? I've tried it with and w/o that, still no luck.
> >
> > --
> > TIA
> >
> > AFJr
> >
> >
> > "Ron Coderre" wrote:
> >
> >> Hi, AF Jr
> >>
> >> If you're not getting a #NAME! error,
> >> then Excel 97 has the SUMPRODUCT
> >> function.
> >>
> >> There are 2 variations of the structure.
> >> If this one doesn't work:
> >> =SUMPRODUCT(($B$21:$B$62="C")*$Q$21:$S$62)
> >>
> >> Try this one:
> >> =SUMPRODUCT(--($B$21:$B$62="C"),$Q$21:$S$62)
> >>
> >> Does that help?
> >> Post back if you have more questions.
> >>
> >> Oh, and thanks for the feedback on the explanation.
> >> Much appreciated.
> >> --------------------------
> >>
> >> Regards,
> >>
> >> Ron
> >> Microsoft MVP (Excel)
> >> (XL2003, Win XP)
> >>
> >>
> >>
> >>
> >> "AFJr" <AFJr@discussions.microsoft.com> wrote in message
> >> news:774723DC-7F3B-4F6C-8AA6-AE7E13707337@microsoft.com...
> >> > Hi Ron,
> >> >
> >> > I wanted to thank you for your GREAT explanation:
> >> >
> >> >>**********************************
> >> >>We'll exploit that feature in SUMPRODUCT.....
> >> >>
> >> >>In this formula:
> >> >>=SUMPRODUCT((A2:A10="Joel")*B2:C10)
> >> >>
> >> >>This expression:
> >> >>(A2:A10="Joel")....returns a series of TRUE/FALSE values
> >> >>depending on whether the cell equals "Joel" or not.
> >> >>and
> >> >>B2:C10 contains NUMBERS!
> >> >>SO..
> >> >>Each TRUE when multiplied by its associated NUMBER
> >> >>returns that number.
> >> >>
> >> >>Each FALSE when multiplied by its associated NUMBER
> >> >>returns converts to a zero...0 x number = 0.
> >> >>
> >> >>SUMPRODUCT returns the sum of all those results
> >> >>which is the sum of all combinations where
> >> >>Col_A="Joel"
> >> >
> >> > My question is this, I'm using Excel97, does this function work in this
> >> > version?
> >> >
> >> > My formula
> >> > =SUMPRODUCT(($B$21:$B$62="C")*$Q$21:$S$62)
> >> > is not working. I thought I understood exactly what you were saying,
> >> > maybe
> >> > not.....
> >> >
> >> >
> >> > --
> >> > TIA
> >> >
> >> > AFJr
> >> >
> >>
> >>
> >>
> >>
>
>
>

Re: Sumif with multiple columns in sum_range by Ron

Ron
Thu Mar 27 08:17:16 CDT 2008

It's time to try another approach:

Try this ARRAY FORMULA (committed with CTRL+SHIFT+ENTER,
instead of ENTER):

=SUM(IF($B$21:$B$62="C",IF(ISNUMBER($Q$21:$S$62),$Q$21:$S$62)))

Does that help?
-------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"AFJr" <AFJr@discussions.microsoft.com> wrote in message
news:C0067CB5-DC0F-443A-B4D4-5FBAFD0733A2@microsoft.com...
> Hi Ron,
>
> Thanks for sticking with me through this. I've checked the data for
> errors.
> I'm not sure if this is a problem or not.
>
> The targeted cells in my formula:
> =SUMPRODUCT(($B$21:$B$62="C")*$Q$21:$S$62)
>
> B21:B62 are just text selected from a list.
>
> Q21:S62 contain formulas, columns Q & R formula is:
> =IF($E:$E=0,"",$E:$E*0)
> {the zero that is multiplied could be a value or zero}
>
> column S is: =IF($E:$E=0,"",(Q22+R22)*0.15)
> (the data in column "E" is a number that represents a "Qty" multiplier)
>
> So when the SUMPRODUCT function is executed it looks at column B to see if
> the value ="C" and produces a "1" if it is(True). If it evaluates to "1",
> columns Q:S formula's are executed and added together. Being that a zero
> could result in the the formula's in columns Q:S I suspect this is giving
> me
> my #VALUE! error. Multiplying any number by zero results in zero but, why
> would this be a problem? Maybe its the way excel evaluates it. If so, I've
> got to come up with another way to do this.
>
> Does this make sense to you? Any other suggestions?
>
> --
> TIA
>
> AFJr
>
>
> "Ron Coderre" wrote:
>
>> The Double-Unary (--) forces a conversion of TRUE/FALSE values to
>> numbers.
>> --TRUE = 1
>> --FALSE = 0
>>
>> so...--{TRUE, TRUE, FALSE}...becomes {1,1,0}
>>
>> You could also multiply boolean values to the same effect:
>> 1*TRUE = 1
>> 1*FALSE = 0
>>
>> But, the Dbl-Minus indicates to knowledgable users that
>> a numeric conversion is intended, versus a calculation.
>>
>> Regarding your #VALUE! error....scan the referenced data and see if
>> there are any errors or irregularities in it.
>>
>> Does that help?
>> --------------------------
>>
>> Regards,
>>
>> Ron
>> Microsoft MVP (Excel)
>> (XL2003, Win XP)
>>
>>
>>
>>
>>
>> "AFJr" <AFJr@discussions.microsoft.com> wrote in message
>> news:80BD6330-4621-42B7-A101-C8C3ADABFAF1@microsoft.com...
>> > Hi Ron,
>> >
>> > Thanks for your quick response.
>> >
>> > I'm getting a #VALUE! error.
>> >
>> > Sorry for not posting that earlier. I'm getting this error using both
>> > structures of the formula. I'm stumped, any ideas?
>> >
>> > One more question, the "--"
>> > =SUMPRODUCT(--($B$21:$B$62="C"),$Q$21:$S$62)
>> > what does that mean? I've tried it with and w/o that, still no luck.
>> >
>> > --
>> > TIA
>> >
>> > AFJr
>> >
>> >
>> > "Ron Coderre" wrote:
>> >
>> >> Hi, AF Jr
>> >>
>> >> If you're not getting a #NAME! error,
>> >> then Excel 97 has the SUMPRODUCT
>> >> function.
>> >>
>> >> There are 2 variations of the structure.
>> >> If this one doesn't work:
>> >> =SUMPRODUCT(($B$21:$B$62="C")*$Q$21:$S$62)
>> >>
>> >> Try this one:
>> >> =SUMPRODUCT(--($B$21:$B$62="C"),$Q$21:$S$62)
>> >>
>> >> Does that help?
>> >> Post back if you have more questions.
>> >>
>> >> Oh, and thanks for the feedback on the explanation.
>> >> Much appreciated.
>> >> --------------------------
>> >>
>> >> Regards,
>> >>
>> >> Ron
>> >> Microsoft MVP (Excel)
>> >> (XL2003, Win XP)
>> >>
>> >>
>> >>
>> >>
>> >> "AFJr" <AFJr@discussions.microsoft.com> wrote in message
>> >> news:774723DC-7F3B-4F6C-8AA6-AE7E13707337@microsoft.com...
>> >> > Hi Ron,
>> >> >
>> >> > I wanted to thank you for your GREAT explanation:
>> >> >
>> >> >>**********************************
>> >> >>We'll exploit that feature in SUMPRODUCT.....
>> >> >>
>> >> >>In this formula:
>> >> >>=SUMPRODUCT((A2:A10="Joel")*B2:C10)
>> >> >>
>> >> >>This expression:
>> >> >>(A2:A10="Joel")....returns a series of TRUE/FALSE values
>> >> >>depending on whether the cell equals "Joel" or not.
>> >> >>and
>> >> >>B2:C10 contains NUMBERS!
>> >> >>SO..
>> >> >>Each TRUE when multiplied by its associated NUMBER
>> >> >>returns that number.
>> >> >>
>> >> >>Each FALSE when multiplied by its associated NUMBER
>> >> >>returns converts to a zero...0 x number = 0.
>> >> >>
>> >> >>SUMPRODUCT returns the sum of all those results
>> >> >>which is the sum of all combinations where
>> >> >>Col_A="Joel"
>> >> >
>> >> > My question is this, I'm using Excel97, does this function work in
>> >> > this
>> >> > version?
>> >> >
>> >> > My formula
>> >> > =SUMPRODUCT(($B$21:$B$62="C")*$Q$21:$S$62)
>> >> > is not working. I thought I understood exactly what you were saying,
>> >> > maybe
>> >> > not.....
>> >> >
>> >> >
>> >> > --
>> >> > TIA
>> >> >
>> >> > AFJr
>> >> >
>> >>
>> >>
>> >>
>> >>
>>
>>
>>



Re: Sumif with multiple columns in sum_range by AFJr

AFJr
Fri Mar 28 14:13:01 CDT 2008

Ron,

You are a godsend! Yes that worked beautifully. I was ready to move on and
try something else but really had no idea.

Again, I really appreciate you sticking with me, trying different things and
such. Helping me to open my mind. I love user groups, a place to give help
and get help.

Thanks again Ron,

Have a great weekend!

AFJr


"Ron Coderre" wrote:

> It's time to try another approach:
>
> Try this ARRAY FORMULA (committed with CTRL+SHIFT+ENTER,
> instead of ENTER):
>
> =SUM(IF($B$21:$B$62="C",IF(ISNUMBER($Q$21:$S$62),$Q$21:$S$62)))
>
> Does that help?
> -------------------------
>
> Regards,
>
> Ron
> Microsoft MVP (Excel)
> (XL2003, Win XP)
>


Re: Sumif with multiple columns in sum_range by Ron

Ron
Fri Mar 28 14:25:43 CDT 2008

You're very welcome.....I'm glad I could help.

Regards,

Ron
Microsoft MVP (Excel)


"AFJr" <AFJr@discussions.microsoft.com> wrote in message
news:755E10A3-7CFC-462E-B1DA-213E6314B750@microsoft.com...
> Ron,
>
> You are a godsend! Yes that worked beautifully. I was ready to move on and
> try something else but really had no idea.
>
> Again, I really appreciate you sticking with me, trying different things
> and
> such. Helping me to open my mind. I love user groups, a place to give help
> and get help.
>
> Thanks again Ron,
>
> Have a great weekend!
>
> AFJr
>
>
> "Ron Coderre" wrote:
>
>> It's time to try another approach:
>>
>> Try this ARRAY FORMULA (committed with CTRL+SHIFT+ENTER,
>> instead of ENTER):
>>
>> =SUM(IF($B$21:$B$62="C",IF(ISNUMBER($Q$21:$S$62),$Q$21:$S$62)))
>>
>> Does that help?
>> -------------------------
>>
>> Regards,
>>
>> Ron
>> Microsoft MVP (Excel)
>> (XL2003, Win XP)
>>
>