Auto create a command button when click another command button in a specific cell and assign code to the newly created command button

  • Hi Could you please explain me why below function is not working in Issue sheet. I want to get 0 for Stock availability column if, item qty in table 3 is less than the same item quantity in table 2., and to get 1 for Stock availability column if, item qty in table 3 is more than the same item quantity in table 2.

    Below is the formula i tried:


    Much thanks in advance!


    • Test3 (1).xlsx

      (14.25 kB, downloaded 69 times, last: )
  • your approach is too easy :)

    The problem is that you have

    1) ignore already ordered items

    2) sum all new items and compare the sum to the stock

    so for this you now need the extra column. I named it "status" and now your macro (admin accepted) has to sign the order as done (e.g. "ordered").

    and recalculate/update the stock

    --> attachment Test3 (1).xlsx

    I ignore any item with "ignored" in the column "status", sum up the rest nd compare it with the Inventory.

  • Thanks for the explanation. But what I need is to first check the first row with inventory (in inventory sheet) and if inventory is enough 1 should be written in G2 (via formula). And then in next column (status) if i marked as "ordered" the same quantity from the same item should be deducted from inventory sheet.

    I have mentioned the same question in below post also.

    MODERATOR NOTICE: This topic has also been posted on other sites and may already have an answer elsewhere. Please take this into consideration when answering this question

    Hyperlink to deduct specific cell value in excel vba

  • I have told you that you are making work for yourself and provided a template using formulas only that you can adapt to your project.

    In addition you have been asked to read the rules yet you have

    1. Cross posted on other Forums
    2. Asked this question here in a slightly different Format
    3. Not used Code Tags

    I am closing this Thread and will close any others that you start that do not follow the Rules.

  • royUK

    Closed the thread.