问题
I just want to ask how can I sum columns horizontaly, skipping every 1 column? Here's the screenshot.
I just want to sum D9 and F9 only whic is the Branch Code. I want to disregard the column "r" which means rank. Please take note that the number of columns is dynamic, there are possibilities that that there are 6 Branches with also 6 branch. Their values will be on the same row, how can I sort it out, by adding only those values under branches? Result should be under the net sales.
Thanks guys!

回答1:
If the "column heading" in row 8 is always an "r" for the columns you want skip, you can use an Excel formula of:
=SUMIF(C8:H8,"<>r",C9:H9)
to sum the values in range C9:H9 for each column where the value in range C8:H8 is not equal to the value "r"
来源:https://stackoverflow.com/questions/17318598/phpexcel-sum-with-skipped-columns