Compare values using SumProduct between sheets (splitting values)

drewberts

Board Regular
Joined
Sep 5, 2013
Messages
177
Office Version
  1. 365
Platform
  1. Windows
I have 2 worksheets - Jobs & Invoices

Within the job sheet I have 3 columns at the end that display the value for the job and the value for the invoice against that job, then a difference calculated. This allows me to ensure my job fees and what I invoice match each other. I'm looking for the difference to always be zero - anything that isnt is coloured by CF. See below

Jobs.jpg

I'm using a basic formual to bring across the Job Fee value fromt the TOTAL FEE column based on a few criteria (which aren't important for the purposes of this problem) - This works fine and the values are always correct. I'm then using a SUMPRODUCT formula to bring across the invoice value from the invoice sheet based on the invoice numbers in INV NO1 & INV NO2 columns etc. The formula I'm using is:-

=IF(SUMPRODUCT((InvoiceTable[Job No]=[@[Job No]])*((InvoiceTable[Type]="INV")+(InvoiceTable[Type]="WO"))*(InvoiceTable[Amount]))))

The invoice table is as follows:-

Invoices.JPG


Everything works fine until we invoice more than one job on a single invoice and then my formula doesn't split the invoice amount accordingly.

The example above highlights this for Jobs 10526, 10527, 10531, 10533, 10534 - each have different values but combine to a total of £2675 (invoice number 10287). How can I get this figure to be proportioned correctly to each job in the job list so that my difference column reads correctly? At present I enter 1 job number against an invoice (and that's obviously the problem). I can't go away from one row for one job and one row for one invoice.

I hope I've explained the conundrum well enough to be understaood.

Any thoughts?
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Ha Ha, have I finally come up with a scenario that is just gobbledegook! :)
 
Upvote 0

Forum statistics

Threads
1,215,222
Messages
6,123,704
Members
449,118
Latest member
MichealRed

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