+ Reply to Thread
Results 1 to 12 of 12

Excel - Stock List Calculation

  1. #1
    Registered User
    Join Date
    11-27-2020
    Location
    Slovenia
    MS-Off Ver
    2016
    Posts
    6

    Excel - Stock List Calculation

    I will try to explain what i need to accomplish

    I have a little firm. I work with stone. I order new material every once in a while and i want to keep track of it. In table X i keep track of everything i get from supplier. (1 - type of stone, 2- dimensions, 3- quantity, 4- quantity that will change).

    I take 1 stone to work on it (i choose stone id 1 - žgano with dimensions 180/200)

    In the Y table i would then select id 1 (which will link to the stone i took to work on from table X) input the dimension of the new stone that remains to work on another project and it would deduct the value from the real quantity in table X.

    I hope you understand now .

    Ok so I have attached a workbook with example. The cells marked in yellow are the one that changed- The real quantity values were deducted based on entry in the table two.

    Best regards
    Attached Files Attached Files
    Last edited by AliGW; 11-29-2020 at 03:54 AM. Reason: Original text reinstated - please do NOT post-edit out details!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,857

    Re: Help with functions

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    11-27-2020
    Location
    Slovenia
    MS-Off Ver
    2016
    Posts
    6

    Re: Help with functions

    Hello,

    I have change the tittle and i hope i explained my problem a little better now.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Excel - Stock List Calculation

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    11-27-2020
    Location
    Slovenia
    MS-Off Ver
    2016
    Posts
    6

    Re: Excel - Stock List Calculation

    Hello i have edited my first post and attached the document.

    I hope there is an easy way to do this.

  6. #6
    Forum Contributor
    Join Date
    09-01-2020
    Location
    bangladesh
    MS-Off Ver
    office 2007
    Posts
    167

    Re: Excel - Stock List Calculation

    E3 cell

    =D3-SUMIF(H:H,A3)

  7. #7
    Registered User
    Join Date
    11-27-2020
    Location
    Slovenia
    MS-Off Ver
    2016
    Posts
    6

    Re: Excel - Stock List Calculation

    Hello

    =D3-SUMIF(H:H,A3) this formula isn't correct. It deducts the number that is in the ID of the table TWO. So if i select ID 2 in table TWO, it deducts 2 from 34. The result then is 32, while it just be 33. It should always deducted 1. (if i select id 1,2,3,.... it should always deducts one from the corresponding row in table ONE)

    Best regards

  8. #8
    Forum Contributor
    Join Date
    09-01-2020
    Location
    bangladesh
    MS-Off Ver
    office 2007
    Posts
    167

    Re: Excel - Stock List Calculation

    TRY THIS
    E3 cell

    =IF(ISERROR(VLOOKUP(A3,H:H,1,)),D3,D3-VLOOKUP(A3,H:H,1,))

    TRY
    E3 cell

    =D3-COUNTIF(H:H,A3)
    Last edited by rayhen; 11-29-2020 at 10:13 PM.

  9. #9
    Registered User
    Join Date
    11-27-2020
    Location
    Slovenia
    MS-Off Ver
    2016
    Posts
    6

    Re: Excel - Stock List Calculation

    Sorry, it doesnt work as i want it

    I have make an example what values should be in the E column of table ONE after i insert the values in table TWO.

    I should also do the same thing if i add values in table TWO.
    Attached Files Attached Files
    Last edited by eliminator; 11-29-2020 at 02:14 PM.

  10. #10
    Forum Contributor
    Join Date
    02-09-2009
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    380

    Re: Excel - Stock List Calculation

    Presumably you're trying to see what left-overs you have to work with after cutting something. In maths this is known as the "cutting-stock problem" & yours is 2-dimensional; which makes it a bit trickier; the more dims the more complexity!

    If I remember correctly the best way to work with this is using a solver to loop through off-cuts & recycle waste.

    Hopefully this gives you some steer towards more fruitful results.
    If it's been helpful please mark as helpful

  11. #11
    Registered User
    Join Date
    11-27-2020
    Location
    Slovenia
    MS-Off Ver
    2016
    Posts
    6

    Re: Excel - Stock List Calculation

    Hello just to let you know. I have tried one more time and this formula works

    =D3-COUNTIF(H:H;A3)

    I would like not to add another column in TABLE TWO. In this table there would automatically insert a type of the stone. So in table ONE there is ID 1 -> stone type fire.

    When i input the the ID 1 in table TWO i would like to automatically copy the type value from type column from table ONE.

    Best regards

  12. #12
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Excel - Stock List Calculation

    Using VLOOKUP like this then perhaps?

    Alf
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 7
    Last Post: 08-18-2017, 11:53 AM
  2. Replies: 6
    Last Post: 03-17-2015, 01:35 AM
  3. Replies: 1
    Last Post: 02-25-2013, 04:25 PM
  4. Replies: 1
    Last Post: 02-10-2012, 05:27 PM
  5. Replies: 0
    Last Post: 11-15-2007, 05:24 AM
  6. Replies: 2
    Last Post: 07-13-2006, 11:30 PM
  7. [SOLVED] Conversion from Spreadsheet Toolkit functions (ESSV....) to EssBase API functions
    By sujay in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-05-2006, 05:20 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1