Complicated formula or macro need to add new sale into correct invoice?

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,194
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi Everyone,

hope you can help

I need a formula or macro to add new sales to existing sales invoices.

we have clients that p[lace orders and pay over 16 instalmentsand offten add new items to the first order

When we get and order an invioce schedule is created with dates and amounts due.

Basicly this amount is in Range BK53:Bk68

Now any new sales are still split into 16 payments based on the same priciple and These are held in Range AY53:Ay68

Any Priviouse Adjustments are saved after BK so BL53:68 could hold amounts etc.

I have an Invioce total In range BI53:BI68 and this is the amount i need to add up

so Invices are set up
I get a new order 3 months in and some have been paid

So I need to identify when the new payments are going to get paid and add them to the payments already created.

In CD53:Cd68 I have if the invoice has already been sent as we can't add tp them (its a Yes or No)

If it is yes then that invoice amoount must be added to the next avaliable Invoice.

I'll do an example bellow hopefully that will help




AYAZBICD
RowNew Sale AmountsNew Total Invoice AmountsCurrent Total Invoice Amountsthis is the important amount as its the one I need to add the new sales to First SaleOld Adjustmentthere might be moreInvoice Created
53100because this invoice has already been created I can't change it so this amount roles over to the next payment21020010yes
10021020010yes
10021020010yes
100
61021020010
10031021020010
10031021020010
10031021020010
10031021020010
10031021020010
10031021020010
10031021020010
10031021020010
10031021020010
10031021020010
10031021020010
68100310210200

<tbody>
</tbody>
please help if you can thanks
Tony
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hi Tony,
as a formula, something like this?
=IF(CD56="yes","",AY56+BI56+IF(CD55="yes",SUM(AY$53:AY55),0))
Cheers,
Koen
 
Upvote 0

Forum statistics

Threads
1,214,813
Messages
6,121,705
Members
449,048
Latest member
81jamesacct

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