Excel Formula to get values old to latest

nabeelahmed

Board Regular
Joined
Jun 19, 2020
Messages
76
Office Version
  1. 365
Platform
  1. Windows
Dear Friends, I am trying to do following where i need your help. Please help me to do below tasks

1- When I enter Customer number in sheet1 (Column"A") old PO number for the same customer with balance quantity from Sheet2(Column"B") should appear in Sheet1(Column"B)
2- When the quantity of old PO finished(Zero) then next PO number for the same customer id should should appear
3- I want PO balance for current PO in Sheet1(Column"B") once quantity issued as described in sheet1(Column"C")


1596868105433.png
1596868137120.png



Thanks & Regards,

Nabeel
 
You have not copied the formula entirely. The Core Point of the formula was PO# number. The PO Number is supposed to be generated automatically and priority is given to PO number generated first (Considering Row 1 being First and Row 10 being last ). So please help me to understand what is your extra requirement considering my formula.

Lets discuss considering what changes you require and what is the methodology of entering data (What should be automatted and what will be entered manually)
 
Upvote 0

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Dear what formula you have provided is perfectly working on that workbook but when i apply on my actual working sheet its not working there maybe there is some mistake from my side while entering formula, can you please check attached and advise me where i am wrong??

Delivery Note Register.xlsm
AGHKADAPAQ
5Sr#PO #PO BalanceCustomer IDQty IssuedHelperPO Order qty Opening
61 000-2020-500004550000-2020-5000045 
72 235-2019-10002352.98235-2019-1000235 
83 000-2015-500001175.55000-2015-5000011 
94 000-2015-500001174.52000-2015-50000110
105 000-2020-500004577.22000-2020-50000450
116 000-2020-500004525.02000-2020-50000450
127 000-2020-500004578.83000-2020-50000450
138 000-2020-500004575.52000-2020-50000450
149 000-2020-500004573.57000-2020-50000450
1510 000-2015-500001175.64000-2015-5000011PO Balance
1611 000-2015-500001124.52000-2015-50000110
DATA
Cell Formulas
RangeFormula
AD6:AD16AD6=+Y6+AB6
AP6:AP16AP6=K6&G6
AQ6:AQ16AQ6=IFERROR(IFERROR(INDEX($H$1:H1,AGGREGATE(14,6,1/(1/(IF(K6&G6=$K$5:K5&$G$5:G5,ROW($K$5:K5)-ROW($K$5)+1))),1)),VLOOKUP(K6&G6,IF({1,0},'PO LIST & STATUS'!$K$5:$K$200,'PO LIST & STATUS'!$G$6:$G$200),2,0)),"")
A7:A16A7=+IF(E7>0,A6+1," ")
G6:G16G6=IFERROR(INDEX(FILTER(IF(K6='PO LIST & STATUS'!$D$6:$D$200,'PO LIST & STATUS'!$F$6:$F$200),IF(K6='PO LIST & STATUS'!$D$6:$D$200,'PO LIST & STATUS'!$F$6:$F$200)<>FALSE),AGGREGATE(15,6,((SUMIF('PO LIST & STATUS'!$K$6:$K$200,K6&FILTER(IF(K6='PO LIST & STATUS'!$D$6:$D$200,'PO LIST & STATUS'!$F$6:$F$200),IF(K6='PO LIST & STATUS'!$D$6:$D$200,'PO LIST & STATUS'!$F$6:$F$200)<>FALSE),'PO LIST & STATUS'!$G$6:$G$200)-SUMIF($AP$5:AP5,K6&FILTER(IF(K6='PO LIST & STATUS'!$D$6:$D$200,'PO LIST & STATUS'!$F$6:$F$200),IF(K6='PO LIST & STATUS'!$D$6:$D$200,'PO LIST & STATUS'!$F$6:$F$200)<>FALSE),$AD$5:AD5))^0)*(ROW('PO LIST & STATUS'!$D$6:$D$200)-ROW('PO LIST & STATUS'!$D$6)+1),1)),"")


Cell Formulas
RangeFormula
D6:D19D6=VLOOKUP(C6,'Customer List'!$B$5:$G$100,2,)
K6:K19K6=D6&F6
 
Upvote 0
PO Quantity it will show error. So I try correct the
Dear Punit, Hope you will be fine.. i was facing some issues regarding above work sheet, hope you can help me o resolve the issues...
I- I can not select Range more than 22 rows ( $B$2:$B$22 ) if i am increasing range to B200 formula is giving error.
II- I have noticed for one customer number right now it showing the same PO number again which is finished already and not auto picking up next new PO number.. its happening only with one customer right now. ( XL2BB) attached below

Please help me to fix it..



 
Upvote 0
Yes I forgot responding you..

Sorry for the delay. Thanks for reminding me..I will go through the error and respond you at the earliest.

Thanks again for reminding me
 
Upvote 0
Hi can you post a external link of your file. My Excel crashes everytime i post your data in my excel

May be Link of Google Drive or One Drive may be used.
 
Upvote 0
Sorry for the delayed response.

In PO# Column AQ just replace with this formula

=IFERROR(INDEX(FILTER(IF(K6='PO LIST & STATUS'!$D$6:$D$30,'PO LIST & STATUS'!$F$6:$F$30),IF(K6='PO LIST & STATUS'!$D$6:$D$30,'PO LIST & STATUS'!$F$6:$F$30)<>FALSE),AGGREGATE(15,6,ROUND(((SUMIF('PO LIST & STATUS'!$K$6:$K$30,K6&FILTER(IF(K6='PO LIST & STATUS'!$D$6:$D$30,'PO LIST & STATUS'!$F$6:$F$30),IF(K6='PO LIST & STATUS'!$D$6:$D$30,'PO LIST & STATUS'!$F$6:$F$30)<>FALSE),'PO LIST & STATUS'!$G$6:$G$30)-SUMIF($AP$5:AP5,K6&FILTER(IF(K6='PO LIST & STATUS'!$D$6:$D$30,'PO LIST & STATUS'!$F$6:$F$30),IF(K6='PO LIST & STATUS'!$D$6:$D$30,'PO LIST & STATUS'!$F$6:$F$30)<>FALSE),$AS$5:AS5))),2)^0*(ROW('PO LIST & STATUS'!$D$6:$D$30)-ROW('PO LIST & STATUS'!$D$6)+1),1)),"")

It was due to Rounding off issue which is solved.
Also 6.21.... which was appearing was due to cell formatted as General. Just format it as Number
 
Upvote 0
Sorry for the delayed response.

In PO# Column AQ just replace with this formula

=IFERROR(INDEX(FILTER(IF(K6='PO LIST & STATUS'!$D$6:$D$30,'PO LIST & STATUS'!$F$6:$F$30),IF(K6='PO LIST & STATUS'!$D$6:$D$30,'PO LIST & STATUS'!$F$6:$F$30)<>FALSE),AGGREGATE(15,6,ROUND(((SUMIF('PO LIST & STATUS'!$K$6:$K$30,K6&FILTER(IF(K6='PO LIST & STATUS'!$D$6:$D$30,'PO LIST & STATUS'!$F$6:$F$30),IF(K6='PO LIST & STATUS'!$D$6:$D$30,'PO LIST & STATUS'!$F$6:$F$30)<>FALSE),'PO LIST & STATUS'!$G$6:$G$30)-SUMIF($AP$5:AP5,K6&FILTER(IF(K6='PO LIST & STATUS'!$D$6:$D$30,'PO LIST & STATUS'!$F$6:$F$30),IF(K6='PO LIST & STATUS'!$D$6:$D$30,'PO LIST & STATUS'!$F$6:$F$30)<>FALSE),$AS$5:AS5))),2)^0*(ROW('PO LIST & STATUS'!$D$6:$D$30)-ROW('PO LIST & STATUS'!$D$6)+1),1)),"")

It was due to Rounding off issue which is solved.
Also 6.21.... which was appearing was due to cell formatted as General. Just format it as Number
Dear yes its perefctly working now... Thank you...
 
Upvote 0
Thank you for the feedback.

And hope it works well. Just remember to input the Quanity in 2 decimal only. As i have used Round( ,2) function.
 
Upvote 0
Thank you for the feedback.

And hope it works well. Just remember to input the Quanity in 2 decimal only. As i have used Round( ,2) function.

Yes it is Working very well & Noted your advice.. Thank you so much again for your support...
 
Upvote 0

Forum statistics

Threads
1,215,051
Messages
6,122,871
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top