Excel Formula Problem

Hello Experts,

I have a problem in excel formula, i attached a sample file that will explain my problem, please have a look in the attached file.

Thanks,

Czher
SAMPLE.xlsx
CzherAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MontoyaProcess Improvement MgrCommented:
I see the file, but I'd like clarification on what you're trying to accomplish.
Is it the criteria section? Can you give an example of values and what they're trying to do? Thanks!
LazyFolkCommented:
this formulae in J2

=SUMIF(C2:C70;C2;I2:I70)-SUMIF(C2:C70;C2;F2:F70)
= SUM of qty received for ID AAA0001 - SUM of qty Out for ID AAA0001

Will compute difference of qty received and qty out for lines 2 to 70 where ID is AAA0001

Is that what you where trying to achieve ?

Excel file filter by ID AAA0001 :

Line      System      ID      DESC      DN      QTY OUT      Status       ARRIVE      QTY Received            
D007      X0001      AAA0001      PIPE      2      17.943      Arrived      Yes      564            
D008      X0001      AAA0001      PIPE      2      13.088      Arrived      Yes      564            
D009      X0001      AAA0001      PIPE      2      14.603      Arrived      Yes      564            
D010      X0001      AAA0001      PIPE      2      16.222      Arrived      Yes      564            
D011      X0001      AAA0001      PIPE      2      19.221      Arrived      Yes      564            
                                                            
Total                              81.077                  2820      Diff =      2738.923
CzherAuthor Commented:
Lammontoya,

Here is the sample of one ID to illustrate what i need t


Line      System      ID      DESC      DN      QTY OUT      Status       ARRIVE      QTY Received            Balance
D007      X0001      AAA0001      PIPE      2      17.943      Arrived      Yes      564 ( initial value)         546.057  
D008      X0001      AAA0001      PIPE      2      13.088      Arrived      Yes                                              532.969
D009      X0001      AAA0001      PIPE      2      14.603      Arrived      Yes                                              
D010      X0001      AAA0001      PIPE      2      16.222      Arrived      Yes                  
D011      X0001      AAA0001      PIPE      2      19.221      Arrived      Yes  

AAA0001: 564 - 17.943 = 546.057
AAA0001: 546.057 - 13.088 = 532.969


Balance = QTY Received - QTY OUT

QTY Received = the value that increase incase that additional item is received
QTY OUT = the Values that are taken from the total quantity of the items received
Balance will be the result of the transaction between the QTY Received - QTY OUT.

I have 10,000 Entries of this that's why i'm asking for help to automate the Balance

Thanks in advance

Czher
Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

Rob HensonFinance AnalystCommented:
Should it just be:

Previous Balance + Received - Withdrawn

Thanks
Rob H
CzherAuthor Commented:
Rob,

It should be "previous balance - withdrawn", but the first row or starting point will be QTY RECEIVED - Withdrawn, because QTY received is already automatically updated in a seperate file.

Thanks
ProfessorJimJamMicrosoft Excel ExpertCommented:
Czher,

here is a solution for you in the attached workbook.

simply from J17 you put the formula =IF(C17="AAA0001",INDEX(J2:J16,MATCH(9.99999999999999E+307,J2:J16,1))-F17,"") and dragdown and it will do the work, no matter how much further rows you have down below.
SAMPLE2.xlsx
CzherAuthor Commented:
Professorjimjam,

if for 1 ID this formula will work, but i have several ID that i need to automate

Thanks.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ProfessorJimJamMicrosoft Excel ExpertCommented:
Czher,

i have provided the solution as per the example. you did not mention that you had multiple IDs

can you fill manually the desired result in the workbook column J , so that i can see what are you looking for?


i have tried now with the attached solution, let me know if this one works for you.
SAMPLE2.xlsx
CzherAuthor Commented:
Professorjimjam,

I attached the sample file with a result in Balance and the example of supposed formula in the first row,

I hope this sample is clear

Thanks.
sample2.1.xlsx
Rob HensonFinance AnalystCommented:
Try this in J2 and copied down:

=SUMIF($C$1:$C2,$C2,$I$1:$I2)-SUMIF($C$1:$C2,$C2,$F$1:$F2)

The ranges looked at will start at row 1 but extend as you copy down.

Thanks
Rob H
ProfessorJimJamMicrosoft Excel ExpertCommented:
Czher

please find attached,  result exactly as per your requirement.
sample.xlsx
LazyFolkCommented:
Here is AAA0001 data extracted from the sample file you provided

Line      System      ID      DESC      DN      QTY OUT      Status       ARRIVE      QTY Received            
 D007      X0001      AAA0001      PIPE      2      17.943      Arrived      Yes      564            
 D008      X0001      AAA0001      PIPE      2      13.088      Arrived      Yes      564            
 D009      X0001      AAA0001      PIPE      2      14.603      Arrived      Yes      564            
 D010      X0001      AAA0001      PIPE      2      16.222      Arrived      Yes      564            
 D011      X0001      AAA0001      PIPE      2      19.221      Arrived      Yes      564          

QTY Received is increased  by 564 in each Line (D007, D008, ...)
But in your last comment you mentionned that it is an initial value.
What happens when you effectively receive some item ? How received qty will be shown in file ?

If all line in D007 represent initial values for all items, you can use this formulae in J2

=IF(ISNUMBER(I2);SUMIF($C$2:$C$15;C2;$I$2:$I$15)-SUMIF($C$2:C2;C2;$F$2:F2);"")

It assumes initial values are all in range I2:I15
If initial value is #N/A, nothing will be shown...
This wont take in account any other qty received

It is funny to notice that item AAA0002 end with negative value...
SAMPLE-Test.xlsx
Martin LissOlder than dirtCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.