You don't need code to do this. Just need a couple of tricks
- highlight the the cells containing all the data (ie A1:A200). Make sure that the last cell in your selection is the last blank cell).
- Use the command GOTO\SPECIAL\BLANKS (press F5 to bring up the GOTO Dialogue)
- Then use the AutoSum button and select the average function.
that should do what you want
Bookmarks