Search code examples
excelexcel-formulasumifs

sumif range over mulitple columns


I have the below table in excel

enter image description here

And I want to add a overall line total in for all w/c columns that have a invoice number in the column next to it.

For example I have used =sumif(B2,">0",A2) to bring back the total for w/c 1st but how can i add all values together across the multiple columns - essentially trying to do a sumif multiple range (if that is possible) to get the same result as the below example: enter image description here

Any help or alternative method to achieve this much appreciated.


Solution

  • You could try:

    enter image description here

    Formula in I2:

    =SUMPRODUCT((ISODD(COLUMN(A2:G2)))*(B2:H2<>"")*A2:G2)