# 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
###### Who is Participating?
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.

Process 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!
0
Commented:
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
0
Author 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 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

Czher
0
Finance AnalystCommented:
Should it just be:

Previous Balance + Received - Withdrawn

Thanks
Rob H
0
Author 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
0
Commented:
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
0
Author Commented:
Professorjimjam,

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

Thanks.
0

Experts Exchange Solution brought to you by

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

Commented:
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
0
Author 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
0
Finance 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
0
Commented:
Czher

sample.xlsx
0
Commented:
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
0
Older than dirtCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
###### 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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.