Thread
:
macros for calculating a new average after inserting a new row
View Single Post
#
1
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
macros for calculating a new average after inserting a new row
try
=average(W:W)
--
Don Guillett
SalesAid Software
"debbz82" wrote in message
...
I was wondering if anyone could help me with this ~~
I am working on a spreadsheet and I need to come up with a macros
that will check all the number in the cells of Column B, so basically
checking row by row. If the number in the cells match, I need to take
the data from the W cell of that row, and keep a running total of the
data in the W cell. All at the same time, I need to keep a count of
how many cells in Column B have the same number, so that I can divide
the running total by this number to find the average score of all these
cells.
For example:
Column B Column W
101 3
101 3
101 6
102 7
In this case, the first 3 rows have the same number for column B. Since
they are the same, I need to add the numbers in Column W of those rows
together , so 3+3+6. Then, since I have counted 3 rows, to find the
average I need to divide 3+3+6 by 3.
Thanks =)
------------------------------------------------
~~ Message posted from
http://www.ExcelTip.com/
~~View and post usenet messages directly from
http://www.ExcelForum.com/
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]