Sumif 2 columns met a condition

Hi Im trying to sum the total of utility made by transfer. So I need a formula that sums the column " Importe" if the column "Tipo Ingreso/Gasto"= " Transferencia" and if the column " Ingreso o Gastos" = " Ingresos" and then substract the same conditions but by the " Ingreso o Gastos" = " Gastos"

I made this formula but it doesn't work:

=SUMIFS([Tipo Ingreso/ Gasto]2:[Tipo Ingreso/ Gasto]501; ="Transferencia" ; [Ingreso o Gasto]2:[Ingreso o Gasto]501 = "Ingresos"; Importe2:Importe501)- SUMIFS([Tipo Ingreso/ Gasto]2:[Tipo Ingreso/ Gasto]501; ="Transferencia"; [Ingreso o Gasto]2:[Ingreso o Gasto]501 = "Gastos"; Importe2:Importe501)


Can somebody help me please 😥


Thank you!

Answers

  • Neil Watson
    Neil Watson ✭✭✭✭✭✭

    SUMIFS( range, criterion_range1 criterion1, [ criterion_range2​criterion2​... ]), where range = The group of cells to sum

    Maybe try:

    =SUMIFS( Importe:Importe, [Tipo Ingreso/ Gasto]:[Tipo Ingreso/ Gasto], ="Transferencia", [Ingreso o Gasto]:[Ingreso o Gasto] = "Ingresos") - SUMIFS(Importe:Importe, [Tipo Ingreso/ Gasto]:[Tipo Ingreso/ Gasto], ="Transferencia", [Ingreso o Gasto]:[Ingreso o Gasto] = "Gastos")

    You may need to swap ; and , depending on regional settings

  • Hi!

    It drops me invalid operation :/


  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭

    Hello

    I built on Neil's formula by adding inadvertently missed commas/semi colons.

    =SUMIFS(Importe:Importe; [Tipo Ingreso/ Gasto]:[Tipo Ingreso/ Gasto]; "Transferencia"; [Ingreso o Gasto]:[Ingreso o Gasto]; "Ingresos") - SUMIFS(Importe:Importe; [Tipo Ingreso/ Gasto]:[Tipo Ingreso/ Gasto]; "Transferencia"; [Ingreso o Gasto]:[Ingreso o Gasto]; "Gastos")

    cheers

    Kelly