Re: Finding the most recent month's (or whatever) data

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



How about just designating 2 cells where you enter a starting date and
ending date for your calculations?

With G1 = start
And G2 = end
Try this to average closing if closing was in Column E and dates are in
Column A:
(Assume all dates are *true* XL recognized dates.)

=SUMPRODUCT((A2:A100>=G1)*(A2:A100<=G2)*E2:E100)/SUMPRODUCT((A2:A100>=G1)*(A
2:A100<=G2))

--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================

"Dallman Ross" <dman@localhost.> wrote in message
news:e8688e$3to$1@xxxxxxxxxxxxxxxxxxxx
In <e85p1k$aks$1@xxxxxxxxxxxxxxxxx>, Dallman Ross <dman@localhost.> spake
thusly:

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?

Okay, I've made a good bit of progress (have also been reading
some articles here).

for example,

=SUMIF($A:$A,">" &TODAY()-60,G:G)/COUNTIF($A:$A,">" &TODAY()-60)

gives me an average of col. G for the last 60 days' data.

Okay, but how do I find the average of data from 31 days ago
through 60 days ago, i.e., the previous month's alone?

dman


.



Relevant Pages

  • #Value! Assistance
    ... >there may be no data in the cells involved in the ... calculations. ... okay. ... >Any asitance with the formula above will be appreciated. ...
    (microsoft.public.excel.worksheet.functions)
  • #Value! Assistance
    ... there may be no data in the cells involved in the calculations. ... currently as long as cell B2 and M2 cantain data, I'm okay. ... Any asitance with the formula above will be appreciated. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: excel/ powerpoint2003
    ... Then, the formula is to choose one of the 12 cells in the range C86:N86, ... Perf. ... (Capex Resp)'!$B53,'Major Projects ... Would appreciate any help hope i explained it okay, ...
    (microsoft.public.excel.misc)
  • Re: Some cells in my spreadsheet are not printing.
    ... Copying the formats from cells that work on the same sheet should cover text that is not black in color. ... Print Preview -- okay ... and because you can see in display it is not Conditional Formatting. ... Check the workbook, right click on Excel logo to left of your menus, view code. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Tick or Toggle Revisited
    ... Bob Phillips wrote: ... Yeah, I tested with horizontal and vertically merged ... cells, and seemed okay. ...
    (microsoft.public.excel)