Thank you for your help.
Cells(3, Cells(3, Columns.Count).End(xlToLeft).Offset(, 1).Column).Resize(x).Formula = s
every time I make an entry and submit the formula is inserted in the next column ie K, L M etc
s = "=MIN(SUMIF($I$1:$I$LR,I3,$L$1:$L$LR)-SUMIF(I$1:I2,I4,O$1:O2),K3)" to s = "=MIN(SUMIF($D$1:$D$LR,D3,$F$1:$F$LR)-SUMIF(D$1:D2,D4,I$1:I2),E3)"
I expected to see the result similar to the fomula =MIN(SUMIF(D:D,D3,F:F)-SUMIF(D$1:D2,D3,I$1:I2),E3) when inserted in column I named FIFO Qty Out in the Table below.
<colgroup><col style="mso-width-source:userset;mso-width-alt:4681;width:96pt" width="128"> <col style="width:48pt" span="10" width="64"> </colgroup><tbody>
[TD="class: xl65, width: 128"]
Date
[/TD]
[TD="class: xl66, width: 64"]
Request_Invoice Number
[/TD]
[TD="class: xl66, width: 64"]
From_To
[/TD]
[TD="class: xl66, width: 64"]
Item_Name
[/TD]
[TD="class: xl66, width: 64"]
Qty_In
[/TD]
[TD="class: xl66, width: 64"]
Qty_Out
[/TD]
[TD="class: xl66, width: 64"]
Unit_Cost
[/TD]
[TD="class: xl66, width: 64"]
Value_Received
[/TD]
[TD="class: xl66, width: 64"]
FIFOQtyOut
[/TD]
[TD="class: xl66, width: 64"]
Balance InStore
[/TD]
[TD="class: xl66, width: 64"]
ValueOut
[/TD]
[TD="class: xl71, width: 128, align: right"]01/09/2018[/TD]
[TD="class: xl72, width: 64, align: right"]7889[/TD]
[TD="class: xl72, width: 64"] [/TD]
[TD="class: xl72, width: 64"]Books[/TD]
[TD="class: xl73, width: 64"]10[/TD]
[TD="class: xl72, width: 64"] [/TD]
[TD="class: xl72, width: 64"] [/TD]
[TD="class: xl72, width: 64"]
[/TD]
[TD="class: xl73, width: 64"]10
[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl71, width: 128, align: right"]02/09/2018[/TD]
[TD="class: xl72, width: 64"]H788727[/TD]
[TD="class: xl72, width: 64"] [/TD]
[TD="class: xl72, width: 64"]Pens[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl72, width: 64"] [/TD]
[TD="class: xl72, width: 64"] [/TD]
[TD="class: xl72, width: 64"] [/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl71, width: 128, align: right"]02/09/2018[/TD]
[TD="class: xl72, width: 64"]H83737[/TD]
[TD="class: xl72, width: 64"]abc Ltd[/TD]
[TD="class: xl72, width: 64"]Pencils[/TD]
[TD="class: xl73, width: 64"]400[/TD]
[TD="class: xl72, width: 64"] [/TD]
[TD="class: xl72, width: 64"] [/TD]
[TD="class: xl72, width: 64"] [/TD]
[TD="class: xl73, width: 64"]315[/TD]
[TD="class: xl67, align: right"]85[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl71, width: 128, align: right"]09/02/2018[/TD]
[TD="class: xl73, width: 64"]76662[/TD]
[TD="class: xl72, width: 64"]XYZ Ltd[/TD]
[TD="class: xl72, width: 64"]Books[/TD]
[TD="class: xl73, width: 64"]100[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl72, width: 64"] [/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl73, width: 64"]100[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl71, width: 128, align: right"]09/02/2018[/TD]
[TD="class: xl73, width: 64"]76662[/TD]
[TD="class: xl72, width: 64"]Abc Ltd[/TD]
[TD="class: xl72, width: 64"]Ruled Papers[/TD]
[TD="class: xl73, width: 64"]100[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl73, width: 64"]30[/TD]
[TD="class: xl73, width: 64"]3000[/TD]
[TD="class: xl73, width: 64"]15[/TD]
[TD="class: xl67, align: right"]85[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl71, width: 128, align: right"]09/04/2018[/TD]
[TD="class: xl72, width: 64"]gyuu766[/TD]
[TD="class: xl72, width: 64"]Admin[/TD]
[TD="class: xl72, width: 64"]Books[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl73, width: 64"]90[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl73, width: 64"]0
[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl71, width: 128, align: right"]09/04/2018
[/TD]
[TD="class: xl72, width: 64"]gyuu766[/TD]
[TD="class: xl72, width: 64"]Sales[/TD]
[TD="class: xl72, width: 64"]Pencils[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl73, width: 64"]90[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl72, width: 128"] [/TD]
[TD="class: xl72, width: 64"] [/TD]
[TD="class: xl72, width: 64"] [/TD]
[TD="class: xl72, width: 64"]pens[/TD]
[TD="class: xl73, width: 64"]100[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl72, width: 64"] [/TD]
[TD="class: xl72, width: 64"] [/TD]
[TD="class: xl73, width: 64"]4[/TD]
[TD="class: xl67, align: right"]96[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl71, width: 128, align: right"]09/09/2018[/TD]
[TD="class: xl73, width: 64"]3029[/TD]
[TD="class: xl72, width: 64"]abc Ltd[/TD]
[TD="class: xl72, width: 64"]Chalk[/TD]
[TD="class: xl73, width: 64"]200[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl72, width: 64"] [/TD]
[TD="class: xl72, width: 64"] [/TD]
[TD="class: xl73, width: 64"]30[/TD]
[TD="class: xl67, align: right"]170[/TD]
[TD="class: xl67, align: right"]0
[/TD]
[TD="class: xl71, width: 128, align: right"]08/10/2018[/TD]
[TD="class: xl73, width: 64"]4399[/TD]
[TD="class: xl72, width: 64"]Dpt QW[/TD]
[TD="class: xl72, width: 64"]Books[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl73, width: 64"]4[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl69"]09/09/2018[/TD]
[TD="class: xl67, align: right"]3029[/TD]
[TD="class: xl67"]dpt ed[/TD]
[TD="class: xl67"]Paracetamol 500mg Tabs[/TD]
[TD="class: xl74, align: right"]200[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl70"] [/TD]
[TD="class: xl67"] [/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl67, align: right"]200[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl69"]08/10/2018[/TD]
[TD="class: xl67, align: right"]4399[/TD]
[TD="class: xl67"]sales[/TD]
[TD="class: xl67"]pens[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]4[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl69"]09/03/2018[/TD]
[TD="class: xl67"]32443r[/TD]
[TD="class: xl67"]Admin[/TD]
[TD="class: xl72, width: 64"]Pencils[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]40[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl68"]31/08/2018[/TD]
[TD="class: xl67"]fdg4521[/TD]
[TD="class: xl67"]Admin[/TD]
[TD="class: xl72, width: 64"]Pencils[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]20[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl68"]30/08/2018[/TD]
[TD="class: xl67, align: right"]46732[/TD]
[TD="class: xl67"]Admin[/TD]
[TD="class: xl72, width: 64"]Pencils[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]50[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl68"]25/08/2018[/TD]
[TD="class: xl67"]2443w[/TD]
[TD="class: xl67"]Admin[/TD]
[TD="class: xl72, width: 64"]Pencils[/TD]
[TD="class: xl74, align: right"]0[/TD]
[TD="class: xl67, align: right"]20[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl68"]23/08/2018[/TD]
[TD="class: xl67"]F6557[/TD]
[TD="class: xl67"]Admin[/TD]
[TD="class: xl72, width: 64"]Pencils[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]10[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl68"]24/08/2018[/TD]
[TD="class: xl67"]wtt56788[/TD]
[TD="class: xl67"]Admin[/TD]
[TD="class: xl72, width: 64"]Pencils[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]25[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl68"]29/08/2018[/TD]
[TD="class: xl67, align: right"]7766712[/TD]
[TD="class: xl67"]XYZ Ltd[/TD]
[TD="class: xl67"]Books[/TD]
[TD="class: xl67, align: right"]1000[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]50[/TD]
[TD="class: xl67, align: right"]50000[/TD]
[TD="class: xl73, width: 64"]154[/TD]
[TD="class: xl67, align: right"]846[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl68"]16/08/2018[/TD]
[TD="class: xl67"]88y77h[/TD]
[TD="class: xl67"]Admin[/TD]
[TD="class: xl67"]Books[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]150[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl68"]15/08/2018[/TD]
[TD="class: xl67"]783h[/TD]
[TD="class: xl67"]Admin[/TD]
[TD="class: xl67"]Books[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]20[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl68"]17/08/2018[/TD]
[TD="class: xl67, align: right"]34[/TD]
[TD="class: xl67"]Sales[/TD]
[TD="class: xl67"]Pencils[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]60[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl68"]25/08/2018[/TD]
[TD="class: xl67, align: right"]43321[/TD]
[TD="class: xl67"]XYZ Ltd[/TD]
[TD="class: xl67"]Ruled Papers[/TD]
[TD="class: xl67, align: right"]890[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]50[/TD]
[TD="class: xl67, align: right"]44500[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl67, align: right"]890[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl68"]14/08/2018[/TD]
[TD="class: xl67"]245ew[/TD]
[TD="class: xl67"]Admin[/TD]
[TD="class: xl67"]Chalk[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]30[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl68"]20/08/2018[/TD]
[TD="class: xl67, align: right"]4533[/TD]
[TD="class: xl67"]Admin[/TD]
[TD="class: xl67"]Ruled Papers[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]15[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl73, width: 64"]0[/TD]
[TD="class: xl67, align: right"]0[/TD]
[TD="class: xl67"] [/TD]
</tbody>
I Appreciate every effort to help me.