Finding the first week when a whole value can be taken i.e. a credit is lower than the total invoice value by customer- MAX, MODE, INDEX

lbanham

Board Regular
Joined
Feb 17, 2011
Messages
50
Afternoon,

In the below example I am trying to work out in what week the credit can be taken, based on the total invoice value (by customer) exceeding the credit value.
I have tried variations of MODE, MAX and INDEX but no success.

any suggestions would be greatly received. :)

1599580615229.png
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Maybe:

Book1
ABCDEFG
1
2CustomerInvoiceDueInvoice or credit noteWeek credit can be paid
3a100Week 1Invoice 
4b200Week 2Invoice 
5a300Week 3Invoice 
6b100Week 1Invoice 
7c200Week 2Invoice 
8d300Week 3Invoice 
9a100Week 3Invoice 
10a250CreditWeek 3
11c250CreditFuture
12
Sheet10
Cell Formulas
RangeFormula
G3:G11G3=IF(E3="Credit",IFERROR(INDEX(D:D,AGGREGATE(15,6,ROW($D$2:$D2)/(SUMIFS(OFFSET(C$2,0,0,ROW(C$2:C2)-ROW(C$2)+1),OFFSET(B$2,0,0,ROW(B$2:B2)-ROW(B$2)+1),B3)>=C3),1)),"Future"),"")


If you have a mixture of credits and Invoices, then we'd need to modify the formula to account for prior credits.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,162
Members
453,021
Latest member
Justyna P

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