macros for calculating data after inserting row

D

debbz82

hi~~
I am working on a spreadsheet where I search through row by row, an
if the data in the Column B of that particular row is equivalent to th
data in the Column B of another row is the same, I add the data in th
Column W of the rows together. Then, I divide the number by the coun
of how many rows are the same. I found a way to do something simila
to this by using =SUM(w3:w9)/rows(w3:w9), but that only works when
insert rows within the row ranges, assuming that the data in Column
of rows 3 through 9 are the same. If I insert a row after row 9 tha
has the same value as the others(column B), the value in Column W o
row 10 does not add to the other numbers.

For example: (original spreadsheet)

Column B Column W
101 3
101 3
101 4
103 2

Since the first three rows have the same value in column B, I need t
add the Column W values of the first three rows, then divide the sum b
3 (which is the count of how many rows have the same Column B value).
Here's my problem:

say i inserted a row after the third row

column B column W
101 3
101 3
101 4
101 2
103 2

the formula that I found no longer works because the fourth row'
column W does not get added..

Any help would be really appreciated thank you so much!!

Debbi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top