View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
JLatham JLatham is offline
external usenet poster
 
Posts: 2,203
Default Finding the most recent month's (or whatever) data

Easiest way to find the last row number in the most primitive situation is to
count nonblank cells in the range where the data is going to be, column A in
this case. Put this in a cell in any column other than A (otherwise you get
a circular reference error).
=COUNTA(A:A)
By " the most primitive situation " I mean one where there aren't any blank
cells in the middle of a list. COUNTA() counts non-blank cells.

Look at grouping and subtotal functions to assist with your averages issues.

"Dallman Ross" wrote:

Hi,

I'm interested in averaging some column ranges. I'm stuck
because I don't see an easy way to find the row number of the
last row with data in it.

For example, assume some stock data:

A B C D E F
Date Open Hi Lo Close Vol
1 4/23 20.00 20.41 19.82 19.89 1,000,000
2 4/28 19.81 21.01 19.81 20.92 1,111,111
3 4/30 21.11 21.81 21.11 21.80 1,010,101
4 5/13 24.14 24.26 24.01 24.02 2,322,122
5 5/19 22.22 23.33 22.13 22.51 1,732,222

And so on. Not every date is filled. (Only trading
days, but let's not even assume that much.) So
suppose I want to average May's data for the close.
I need to know that the data ends on Row 5. Then
I need to average only entries that show May in Col. A.
can someone help me do this?

I have a feeling some will say it's not necessary to find the
bottom row number. But I still would like to know how to find it.
Oh, and I will also want to find, e.g., averages for the last year,
3 months, etc., as well.

Thanks,
dman