ineedacookie
New Member
- Joined
- Nov 20, 2009
- Messages
- 3
Hi there, first time trying Mr Excel,
In my sheet I already have a string of macros that copies information onto a newly created sheet. For this new sheet:
All I'd like to to do is write one more macro that will search column B for the text "average", once found, to teh left of that text (in column A), take average of all the numbers ending from 1 cell above, all the way up to where there's a blank cell.
Then after that's done, search for the next "average" below (skipping the blank cells).
There are many, numerous subgroupings all of varying size (2 rows to 50 rows).
Macro can replace existing average number in the cell in ColA.
Here's an example of what sheet created looks like:
ColA ColB ColC
level name
-10 fea
-4 few
-2 feet
-59 average
-10 fea
invalid fea
-4 few
-4 few
-2 feet
45 average
-10 fea
-4 few
-10 fea
-4 few
-10 fea
invalid few
-10 fea
-4 few
-2 feet
2 average
Can you please offer guidance on this?
In my sheet I already have a string of macros that copies information onto a newly created sheet. For this new sheet:
All I'd like to to do is write one more macro that will search column B for the text "average", once found, to teh left of that text (in column A), take average of all the numbers ending from 1 cell above, all the way up to where there's a blank cell.
Then after that's done, search for the next "average" below (skipping the blank cells).
There are many, numerous subgroupings all of varying size (2 rows to 50 rows).
Macro can replace existing average number in the cell in ColA.
Here's an example of what sheet created looks like:
ColA ColB ColC
level name
-10 fea
-4 few
-2 feet
-59 average
-10 fea
invalid fea
-4 few
-4 few
-2 feet
45 average
-10 fea
-4 few
-10 fea
-4 few
-10 fea
invalid few
-10 fea
-4 few
-2 feet
2 average
Can you please offer guidance on this?