View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] basu.sudip@gmail.com is offline
external usenet poster
 
Posts: 1
Default Formula for sum of alternate cells

On Thursday, September 25, 2008 2:59:00 PM UTC+5:30, John Blackwell wrote:
Folks,I'm trying to find a formula for summing the contents of alternate cells in a row?I have a large workbook and want to calculate the contents of row 23 - i.e. E23, G23, I23, K23, M23 etc etc, up to KK23. Is there a simple formula for this?John Blackwell

Jan Jan Feb Feb Total Total
Sales Type 2013 2014 2013 2014 2013 2014
A 362 762 512 932 874 1,694
B 407 751 834 427 1,241 1,178
A 311 694 519 778 830 1,472
B 714 484 697 478 1,411 962
A 281 952 548 503 829 1,455
B 648 527 398 567 1,046 1,094
A 476 947 161 287 637 1,234
B 526 801 966 896 1,492 1,697
A 556 235 267 217 823 452
B 102 168 728 621 830 789
A Total 2,397 2,731 3,623 2,989 6,020 5,720
B Total 1,986 3,590 2,007 2,717 3,993 6,307


For Column Total of 2013: =SUM(IF((1-MOD(COLUMN($D22:$G22),2)<0),$D22:$G22))
For Column Total of 2014: =SUM(IF((MOD(COLUMN($D22:$G22),2)<0),$D22:$G22))
For Alternate Row Total of ROW of A for 2013: =SUM(IF((MOD(ROW(D$22:D$31),2)<0),D$22:D$31))
For Alternate Row Total of ROW of B for 2013: =SUM(IF((MOD(1+ROW(D$22:D$31),2)<0),D$22:D$31))

Copy the formula and define the range as desired and then press "CTRL+SHIFT+ENTER"

Hope this is fine.