Stocks were distributed on different days which I named as quot;mondayquot;,
quot;tuesdayquot;...quot;sundayquot;. The list has stock code, price, qty and amount. I want
sum of quantity in B1 and amount in C1, when I enter stock code in A1.
Oh my god somebody help me.
You can use SUMIF( ) to do this. If you enter stock code in A1 then in
C1 enter the formula:
=SUMIF(A2:A2000,A1,C1:C2000)
(from your description I think quantity will be in column C, but you
can put this in B1 instead if you want to). Similarly, if amount is in
column D, enter this is D1:
=SUMIF(A2:A2000,A1,D12000)
I've assumed the data extends to row 2000 - adjust if necessary. Not
sure what you want to do with the days information in your posting.
Hope this helps.
PeteThanks Mr Pete. So you want me to repeat this formula 7 times in qty cell B!
amp; amount cell D1. Is there any chance, I give all the array names (monday,
tuesday,..) in formula, like looking in monday if the code is there get the
sum, likewise in tuesday.. that is giving all array names look for code amp;
their qty / amount. Sumproduct() will be useful ?. Bcos it will be easy for
me to skip any day or keep only 3days like, to reconcile dispensing account.
thanks a million.
quot;Pete_UKquot; wrote:
gt; You can use SUMIF( ) to do this. If you enter stock code in A1 then in
gt; C1 enter the formula:
gt;
gt; =SUMIF(A2:A2000,A1,C1:C2000)
gt;
gt; (from your description I think quantity will be in column C, but you
gt; can put this in B1 instead if you want to). Similarly, if amount is in
gt; column D, enter this is D1:
gt;
gt; =SUMIF(A2:A2000,A1,D12000)
gt;
gt; I've assumed the data extends to row 2000 - adjust if necessary. Not
gt; sure what you want to do with the days information in your posting.
gt;
gt; Hope this helps.
gt;
gt; Pete
gt;
gt;
- Jan 24 Wed 2007 20:35
search and sum
close
全站熱搜
留言列表
發表留言