Finding the most recent month's (or whatever) data
From: Dallman Ross <dman_at_localhost.>
Date: Sat, 1 Jul 2006 12:15:48 +0000 (UTC) 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,
|
Click to report inappropriate content