Is it possible to do this in Excel..


New Member
Aug 18, 2010
I am an average good user of excel, till now I have been able to solve all kind of complex calculations some way but I have encountered a situation & wondering if there is any way to do this in excel or using some VBA. I would be grateful to all of you for this.

My excel sheet is some thing like this

Order No Require Item Require Qty Stock Status
10001 XXXXX 100 300 200
10001 YYYYY 100 200 100
10002 XXXXX 200 300 200
10002 YYYYY 200 200 100
10003 XXXXX 100 300 100
10003 YYYYY 100 100 000

There are a lot of different orders for different different products but all have some common ingredients. On any given day If I see my pending orders & Inventory then it looks like above & showing all stock available but I can't process all my orders as stock will be reduced after first order, then I wont be able to process second order but I can process 3rd one . What I want to do is process this data some way that It takes the first order & if all the material is available then reduce the stock so in above example after first order XXXXX will be left 200 & YYYYY 100. Then for next order XXXXX is sufficient but YYYYY is not available so no stock shall be deducted & for third order calculation also XXXXX will be 200 & YYYYY will be 100 & if there is any next order then for that XXXXX = 100 & YYYYY = 0 . Then show it in next column.

I don't think it's possible without VBA but I am not much familiar with that other than copy & pasting the codes from web & modifying here & there. But an expert might do it with excel also.. (I will appriciate if any1 can give me a VBA code ) This is just example in actual my data is 20000 or more row with a lot of product combinations.

Thanking you all in advance for your input & support

Forum statistics

Latest member

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...