Nov 12, 2003 #1 mimi2 Technical User Apr 2, 2002 407 CA Hello, Is there a way to sum columns by year ? these are my columns year month frequency 2002 1 2 2002 1 1 2001 3 1 2001 12 3 i need to sum the frequency column by year. For example for 2001---> 4 2002---> 3 how can i do that ? Thanks a lot
Hello, Is there a way to sum columns by year ? these are my columns year month frequency 2002 1 2 2002 1 1 2001 3 1 2001 12 3 i need to sum the frequency column by year. For example for 2001---> 4 2002---> 3 how can i do that ? Thanks a lot
Nov 12, 2003 1 #2 S SkipVought Programmer Dec 4, 2001 47,492 US Hi, as long as your table is sorted by year, use the SUBTOTAL WIZARD -- menu item Data/Subtotal Skip, Skip@TheOfficeExperts.com http://www.TheOfficeExperts.com Upvote 0 Downvote
Hi, as long as your table is sorted by year, use the SUBTOTAL WIZARD -- menu item Data/Subtotal Skip, Skip@TheOfficeExperts.com http://www.TheOfficeExperts.com
Nov 12, 2003 Thread starter #3 mimi2 Technical User Apr 2, 2002 407 CA Thanks. i was looking for some sort of code to write but i did it as you said with the wizard. i would like to learn to do that. Upvote 0 Downvote
Thanks. i was looking for some sort of code to write but i did it as you said with the wizard. i would like to learn to do that.
Nov 13, 2003 #4 iGrant Technical User Jun 28, 2002 41 GB You could also use SUMIF. At the end of your table of data, use the formula =SUMIF($A$1:$A$20,2001,$C$1:$C$20) Where your 'year' data is in column A, and frequency is in column C. This will then total all the frequency items that appear in a row with 2001. Copy the formula for each other year you're interested in. To make it neater, instead of typing '2001' in the above formula, type 2001 (2002, 2003 etc) in cells, and reference the cells in your formula. Upvote 0 Downvote
You could also use SUMIF. At the end of your table of data, use the formula =SUMIF($A$1:$A$20,2001,$C$1:$C$20) Where your 'year' data is in column A, and frequency is in column C. This will then total all the frequency items that appear in a row with 2001. Copy the formula for each other year you're interested in. To make it neater, instead of typing '2001' in the above formula, type 2001 (2002, 2003 etc) in cells, and reference the cells in your formula.