A formula to average data from the last month

I am trying to make a formula that will give an average of the numbers from column 'D' of 'TEST SHEET' into another Tab. That is easy enough, but I only want to use the data from the last 30 days.

I've been trying to create a formula, but I am new to these things and have only received error messages.

TEST SHEET

Upvotes: 0

Views: 107

Answers (1)

Kishan
Kishan

Reputation: 1810

Try the following formula:

=AVERAGEIF('TEST SHEET'!A3:A,">"&today()-30,'TEST SHEET'!D3:D)


To get average for the days between last 60 and last 30 days ago, try the following formula:

=AVERAGEIFS('TEST SHEET'!D3:D,'TEST SHEET'!A3:A,">"&today()-60,'TEST SHEET'!A3:A,"<"&today()-30)

Upvotes: 1

Related Questions