• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Equation to calculate the last balance of a commodity

Hany ali

Active Member
hello every one
please i want to correct this formula ,to calculate the last balance for Certain Items ,if this item Duplicate (More than One)as you see in Photo and File
Code:
=IF(COUNTIF($C$2:$C2,$C2)>1,LOOKUP(2,1/((Store!$A$2:$A$28=C2)),$F$2:$F$1400),SUMIF(Store!$A:$A,$C2,Store!$B:$B))
 

Attachments

  • 1.png
    1.png
    102.9 KB · Views: 4
  • Store.xlsm
    569.4 KB · Views: 4
Hi:

Not completely sure what you want here... refer to the yellow column in that attached.

Note:

- Array formula , execute by pressing Control+Shift+Enter
- I had constructed the formula in a different column, since you have circular references in your formulas, you may want to rethink the logic how to avoid this.

Thanks
 

Attachments

  • Store.xlsm
    651.8 KB · Views: 2
thanks alot ,but this formula Not which i want-because
if this Goods First Item in The Column
,it Should Be to Take Number Of Balane
From Store Sheet it will be 150 not 70

and you can see the Result Which I want in my File

GoodsBalancethe Result Which I want
Steal150150
Leather8080
Textile67
Steal140140
Textile65
Plastic85
Copper60
Textile4
paper4
Aluminum128
paper3
Leather60
Plastic53
Copper44
Aluminum99
 

Attachments

  • Untitled.png
    Untitled.png
    100 KB · Views: 4
  • Store1.xlsm
    650.7 KB · Views: 7
Last edited:
Hi ,

See if this works :

=IF(COUNTIF(C$2:C2,C2)=1,INDEX(Store!$B$2:$B$9,MATCH(C2,Store!$A$2:$A$9,0)),INDEX(Store!$B$2:$B$9,MATCH(C2,Store!$A$2:$A$9,0)) - SUMIF(C$1:C1,C2, F$1:F1))

Narayan
 
Back
Top