Consulting

Results 1 to 3 of 3

Thread: Filter quantity of the commodity code from total data and minus decesing ???

  1. #1
    VBAX Newbie
    Joined
    Jan 2018
    Posts
    1
    Location

    Filter quantity of the commodity code from total data and minus decesing ???

    Hi all,
    Please help me about this situtation.
    I have much orders which are have some kind of goods is the same. It's on the data_need_find sheet.
    The inventory have the total data = data_source sheet.
    And the question is, how I could make a macro to minus decesing the quantity of each kind of goods by each order, like this:

    data_need_find.jpg

    the data_source:

    data_source.jpg

    Thanks you so much.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,875
    You can do this without macros.
    In the attached is a formula in cell L3 of sheet data_need_find:
    =VLOOKUP($B3,data_source!$B$1:$C$75,2,0)-C3-SUMIF($B$2:$B2,$B3,$C$2:$C2)
    which can be copied down.
    The formulae in columns E to G are simple formulae all referring to column L
    The formulae in cells shaded light green can be deleted because there's nothing in column A for those rows.
    You should not delete the formulae in cells shaded red because this signals to you that the commodity in column A has not been found on sheet data_source.
    Attached Files Attached Files
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,875
    Oh groan.
    Now I see that I've completely wasted my time because you already had a solution elsewhere!
    Read the effing rules!
    You've cross posted this at:
    https://www.mrexcel.com/forum/excel-...-decesing.html
    and:
    https://www.excelforum.com/excel-pro...-decesing.html
    Both these sites have the same rules.

    What's it all about? Read this: http://www.excelguru.ca/content.php?184
    We're humans, not machines.

Posting Permissions

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