Related:
- Average above "n" rows in blank row
- Saints row 2 cheats - Guide
- How to delete a row in a table in word - Guide
- Saints row free download - Download - Action and adventure
- Vba last non empty row - Guide
- Convert row to column in notepad++ ✓ - Excel Forum
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Apr 30, 2011 at 01:18 AM
Apr 30, 2011 at 01:18 AM
no need of a macro . no need of a blank row.
subtotal function will do
sample data like this(col. c additional column . C2 has formula
=month(a2) and c2 is copied down.
date price month
1-Jan 42 1
8-Jan 90 1
15-Jan 68 1
1-Feb 66 2
9-Feb 84 2
18-Feb 62 2
2-Mar 41 3
5-Mar 82 3
28-Mar 75 3
click data(menu bar)-subtotals
in the subtotal window
"at each change in"
choose "price"
under "use function"
choose "average"
under add subtotal to
check "month"
check "replace current subtotals"
check "summary below data"
click ok
you will get
date price month
1-Jan 42 1
8-Jan 90 1
15-Jan 68 1
66.66666667 1 Average
1-Feb 66 2
9-Feb 84 2
18-Feb 62 2
70.66666667 2 Average
2-Mar 41 3
5-Mar 82 3
28-Mar 75 3
66 3 Average
67.77777778 Grand Average
will this not do . still do you want a macro?
subtotal function will do
sample data like this(col. c additional column . C2 has formula
=month(a2) and c2 is copied down.
date price month
1-Jan 42 1
8-Jan 90 1
15-Jan 68 1
1-Feb 66 2
9-Feb 84 2
18-Feb 62 2
2-Mar 41 3
5-Mar 82 3
28-Mar 75 3
click data(menu bar)-subtotals
in the subtotal window
"at each change in"
choose "price"
under "use function"
choose "average"
under add subtotal to
check "month"
check "replace current subtotals"
check "summary below data"
click ok
you will get
date price month
1-Jan 42 1
8-Jan 90 1
15-Jan 68 1
66.66666667 1 Average
1-Feb 66 2
9-Feb 84 2
18-Feb 62 2
70.66666667 2 Average
2-Mar 41 3
5-Mar 82 3
28-Mar 75 3
66 3 Average
67.77777778 Grand Average
will this not do . still do you want a macro?
Apr 30, 2011 at 05:12 AM