Share via

AVERAGEIFS and Current Month

Anonymous
2015-09-28T15:07:00+00:00

Hey guys,

I am creating a spreadsheet in which I need to average some stats if they are in the current month. The formula is this: =AVERAGEIFS(A:A,J:J,"=Survey",B:B,">42248")

So, what it currently does is to average column A if the corresponding line in column J says "Survey", and the date in column B is greater than "42248" (September 1st).

I want it to do this without me having to change the numerical date (42248) each month. What I have so far is: =AVERAGEIFS(A:A,J:J,"=Survey",B:B,">(EOMONTH(TODAY(),-1)+1)")

The problem is that it comes back as either 0 or #DIV/0!

Can anybody help point out the sytax error? I have been toying with it for a while and can't quite figure it out.

Thank you.

 - Zokah

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2015-09-28T15:17:39+00:00

Change the formula to

=AVERAGEIFS(A:A,J:J,"=Survey",B:B,">"&EOMONTH(TODAY(),-1)+1)

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2015-09-28T16:13:17+00:00

    Hey HansV!

    That was exactly it. Thank you!

    Was this answer helpful?

    0 comments No comments