Hi,
I have a spreadsheet with dates running down column J, and a number running down column K. I want to average the numbers in column K for all the rows that are less than 30 days old.

I have a formula for determining if a date is less than a month old:
=IF(DATEDIF(J2,TODAY(),"d")<31,TRUE,FALSE)

How can I translate that into averaging a range?

Thanks,

Dan

Edit: I'm using Excel 2003