Subtracting dates for IF criteria

Hello, everyone, and thank you in advance!

I am trying to subtract to dates as criteria for an AVERAGEIFS statement so it only averages the data for the last month. I have tried many things, and I think this would be the simplest possible answer, but I don’t get it to work, probably because my syntax is wrong. I am trying:

=averageifs(B7:B999;>today()-30)

So, my criteria should be that the result is larger than “>” the value of the current date “today()” minus 30 days. I get error:510

Maybe someone here knows an alternative check or the right syntax. Got any ideas?

Thanks again =))

1 Like

Where is your data, which you want averaged?
Where are your dates, which you want to filter by?

At best, upload a copy of your file. If there is confidential info, you need to mangle that before upload. This is a public place :wink:
To upload, it is recommended to edit your initial question (the pencil icon below the posting) and then click the upload icon (box with up arrow above the edit pane) to attach the upload to the question.

1 Like

Did you (@Centaro1) read the help on AVERAGEIFS() ?

=averageifs(B7:B999;">"&(today()-30))
2 Likes

Right, I was actually reading your answers in other posts as you answered. Thank you for everything!

Make that AVERAGEIF() instead and it could work :wink:

1 Like