fish number fish weight sum3-4 sum 4-5
31457 3.5
45367 4.5
34289 3.5
sum 3-4 should return sum of the two rows with between 3 and 4 (230111)
and sum 4-5 shold return sum sum of the row with 4.5 (45367)
If your data is in the cells a4:b6 try something like the formula below
=SUMPRODUCT((B4:B6lt;5)*(B4:B6gt;4)*(A4:A6))
It is not clear if you require lt; and gt; or lt; and gt;= for your
parameters
Regards
Dav--
Dav
------------------------------------------------------------------------
Dav's Profile: www.excelforum.com/member.php...oamp;userid=27107
View this thread: www.excelforum.com/showthread...hreadid=519649sorry i had to fix a number here - its ok now
quot;gt; fish number fish weight sum3-4 sum 4-5
gt; 31457 3.5
gt; 45367 4.5
gt; 34289 3.5
gt;
gt; sum 3-4 should return sum of the two rows with between 3 and 4 (230111)
gt; and sum 4-5 shold return sum sum of the row with 4.5 (204151)
gt;
gt;
=SUMPRODUCT(--(A1:A100gt;=3),--(A1:A100lt;4)
etc.
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
quot;farmerquot; gt; wrote in message
...
gt; fish number fish weight sum3-4 sum 4-5
gt; 31457 3.5
gt; 45367 4.5
gt; 34289 3.5
gt;
gt; sum 3-4 should return sum of the two rows with between 3 and 4 (230111)
gt; and sum 4-5 shold return sum sum of the row with 4.5 (45367)
gt;
gt;
If I understand correctly, you want to multiply the number of fish by the
wieght and categorise the total weight by individual fish weight. It's not
clear what you want to do with a fish weighing exactly 4, so I've assumed
3-4 includes 4.
I've assumed your data as posted occupies A14
In C2
=IF(AND(B2gt;3,B2lt;=4),A2*B2,0)
Copy down the column
In D2
=IF(AND(B2gt;4,B2lt;5),A2*B2,0)
Copy down the column
At the bottom of columns C amp; D, sum the cells above eg
In C101
=SUM(C2:C100)
In D101
=SUM(D2100)
--
Ian
--
quot;farmerquot; gt; wrote in message
...
gt; sorry i had to fix a number here - its ok now
gt;
gt; quot;gt; fish number fish weight sum3-4 sum 4-5
gt;gt; 31457 3.5
gt;gt; 45367 4.5
gt;gt; 34289 3.5
gt;gt;
gt;gt; sum 3-4 should return sum of the two rows with between 3 and 4 (230111)
gt;gt; and sum 4-5 shold return sum sum of the row with 4.5 (204151)
gt;gt;
gt;gt;
gt;
gt;
thanks a lot all of you
quot;Bob Phillipsquot; gt; skrev i melding
...
gt; =SUMPRODUCT(--(A1:A100gt;=3),--(A1:A100lt;4)
gt;
gt; etc.
gt;
gt; --
gt; HTH
gt;
gt; Bob Phillips
gt;
gt; (remove nothere from email address if mailing direct)
gt;
gt; quot;farmerquot; gt; wrote in message
gt; ...
gt;gt; fish number fish weight sum3-4 sum 4-5
gt;gt; 31457 3.5
gt;gt; 45367 4.5
gt;gt; 34289 3.5
gt;gt;
gt;gt; sum 3-4 should return sum of the two rows with between 3 and 4 (230111)
gt;gt; and sum 4-5 shold return sum sum of the row with 4.5 (45367)
gt;gt;
gt;gt;
gt;
gt;
- Apr 21 Sat 2007 20:36
need to know how to get the sum of right product returned
close
全站熱搜
留言列表
發表留言