Formula to subtract from last instance of variable in rows above

Bezurk

New Member
Joined
Feb 5, 2014
Messages
14
Please can someone help.
Please see screenshot here: Screenshot
There is a column where the user will select the CUSTOMER NAME from a drop-down menu, this will then automatically display the amount of skips that the customer has taken in the TOTAL SKIPS column.
The user will then input how many skips they would like to invoice by putting in the value in the column SKIPS TO INV, the last column OUTSTANDING, is basically the TOTAL SKIP minus SKIPS to INV (to give a total of how many skips are left to invoice).
The issue is that customers are not selected sequentially, thus I need a formula in the TOTAL SKIPS column that will display the last value from the OUTSTANDING column of the last instance of the customer name above.
E.g. When selecting customer name 1, the value displayed in column TOTAL SKIP will show the last value from the OUTSTANDING column of customer 1 which was 3 rows above.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
What would you like to display in case of Invoice No INA2009002 Customer No 4 (Row 2)
which doesn't have any outstanding above.

If we put a formula in Total SKIP then you cannot enter data automatically.

his will then automatically display the amount of skips that the customer has taken in the TOTAL SKIPS column.

We need to alter that too also.
 
Upvote 0
How about this

Book1
BCDEFGHI
4INVOICECUSTOMER NAMESITE ADDRESSORDER NOTOTAL SKIPSKIPS TO INVOUTSTANDINGTotal Skip (Helper)
5INA20090021j45673110 
6INA20090024b734523410
7INA20090021j45674
8INA200900411
9INA20090051
10INA20090061j4567
11INA20090071
12INA20090084
13INA20090094
Sheet2
Cell Formulas
RangeFormula
I5:I7I5=IFERROR(IF(MATCH(B5,$B$4:B4,0),LOOKUP(2,--($B$4:B4=B5),$H$4:H4)),"")
 
Upvote 0
Sorry i didnt check for formula. Please replace the formula with
=IFERROR(IF(MATCH(B5,$B$4:B4,0),LOOKUP(9999999999999,ROW($H$4:H4)/($B$4:B4=B5),$H$4:H4)),"")
 
Upvote 0

Forum statistics

Threads
1,214,861
Messages
6,121,971
Members
449,059
Latest member
oculus

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