Your original formula looked like:
=SUMIF($D$26:D$41,"C",SUMIF($B$26:$B$41,"*9.10.06" ,$H$26:$H$41),0)
And that looked like B26:B41 is the range that should be compared to "*9.10.06".
Aidan's response:
=sumproduct(--($d$26:D$41="C"),--($B$26:$B$41="*9.10.06"),$H$26:$H$41)
looks for C in D26:D41
and *9.10.06 (the text--not a date) in B26:B41
When both are true on the same row, it'll use the value in H26:H41.
If this isn't what you want, you'll want to share your requirements (and the
formula that failed).
And some notes...
Adjust the ranges to match--but you can't use whole columns (except in xl2007).
=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.
Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html
Gerry Cornell wrote:
Aidan
Thanks for responding.
Your suggestion produces an error. The $H$41 is highlighted.
I have not previously used sumproduct and I have never managed to
master arrays. Can you please point me to what is wrong.
One thing. I cannot see how Excel knows to look in $C$26:$C$41 for
*9.10.06"?
TIA
--
~~~~
Gerry
~~~~~~~~
Enquire, plan and execute.
Stourport, England
~~~~~~~~~~~~~~~~~
wrote in message
oups.com...
SUMIF wouldn't like that - sumif is
SUMIF(rangetotest,test,optional range to sum)
I THINK you want something along the lines of
=sumproduct(--($d$26:D$41="C"),--($B$26:$B$41="*9.10.06"),$H$26:$H$41)
Gerry Cornell wrote:
What is wrong here please?
=SUMIF($D$26:D$41,"C",SUMIF($B$26:$B$41,"*9.10.06" ,$H$26:$H$41),0)
TIA
--
~~~~
Gerry
~~~~~~~~
Enquire, plan and execute.
Stourport, England
~~~~~~~~~~~~~~~~~
--
Dave Peterson