ChrisK1994

New Member
Joined
Aug 20, 2019
Messages
2
remaining Old Contract Credits10Price30
New Contract Credits50Price25
Out of contract (no credits)Price35
Remaining Credits60

<tbody>
</tbody>

Order
order 1 number of booksorder 2 number of booksorder 3 number of books
Book 1222
book 23400
book 34101
invoiceFormula neededFormula neededFormula needed

<tbody>
</tbody>

so for example here we have 3 books we sell customers agree an annual amount of books they will buy (credits) upfront with contracts and get invoiced instantly £10 per credit ordered in that contract. the remaining cost is invoiced per order.

in this example a customer has 10 credits left on his old contract. his old contract was £30 per book. he has now signed a new contract for 50 more credits at £25. (any orders with no credits left is £35)

now i have a table showing 3 separate orders what formula can i use to invoice each order correctly using the price for the remaining credits first and then using the new contract price after that and if no credits left charging the out of contract price.

i tried an IF formula so if Remaining credits is greater than new contract credits then charge old price - 10 (-10 as they pay £10 up front when signing contract) if remaining credits is less than or equal to the new contract credits then charge the new contract price and if remaining credits is less than or equal to 0 charge out of contract price.

but if one order contained both pricing it couldn't work it out so in the example order 2 should take into account all 3 pricing
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,213,554
Messages
6,114,280
Members
448,562
Latest member
Flashbond

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