SOLVED

Help with a formula to only count dates of the month that have already occurred

New Contributor

I have a tracker that I update one day a month with data of patients that we see.  On the same workbook I have another section that gives the averages of patients seen on certain dates.  The formula I'm currently using includes the data of the whole month, even days that have not occurred yet and it's including the 0 when calculating the average.  I was wondering if there's a formula that can only calculate the average visits from the start of the month to the present day TODAY()?

2 Replies
best response confirmed by ExcelandStuff (New Contributor)
Solution

@ExcelandStuff 

Change the formula in your screenshot to

 

=IFERROR(AVERAGEIFS(F$5:F$34, $B$5:$B$34, "<="&TODAY(), $C$5:$C$34, $N14), 0)

Thank you so much for your help! I sincerely appreciate it