Search code examples
excelexcel-formulaexcel-2007

Find the string subtract matching values


enter image description here

I want to calculate J column cells automatically based on A , C and I cells, as shown in screenshot for contract ID 111 total value is 800 and in C column there are total 600 values against 111 contract ID, I want to to auto calculate the remaining amount in J cells against each contract.


Solution

  • Use SUMIFS and simple subtraction.

    =I2-SUMIFS(C:C,A:A,H2)