Averageifs returns #div/0 using a date range

jsical

New Member
Joined
May 22, 2020
Messages
14
Office Version
  1. 365
Platform
  1. Windows
I am trying to find the avg of a value base on a range of dates. In column A i have the dates (there are empty cells in this column", column C I have the value i want to AVG. i am using the following formula =AVERAGEIFS(C:C, A:A, "<= 1/1/27", A:A, ">= 1/1/2021"), but continued to get a #/div/0. There a plenty of line items with date in between the criteria, I am not sure if the blank cells are causing the issue or not. I have also try doing the following =AVERAGEIFS(C:C, A:A, ">= 1/1/21", A:A, "<= 1/1/2027") and i get the same error. can you help me? thanks
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
I'm having problems replicating the error you're getting. Could you provide a sample of your actual data using the XL2BB Tool?

hyperlink.xlsb
ABCDEFGHI
1DateValueStartEnd
21/01/20201001/01/20211/01/2027
31/01/2021100
4
51/01/202350AVERAGEIFS:93.75
6
71/01/202575AVERAGEIFS:93.75
81/01/2026
91/01/2027150
101/01/2028
111/01/2029100
12
13
Sheet3
Cell Formulas
RangeFormula
F5F5=AVERAGEIFS(C:C,A:A,">="&E2,A:A,"<="&F2)
F7F7=AVERAGEIFS(C:C,A:A,">=1/01/2021",A:A,"<=1/01/2027")
 
Upvote 0
I'm having problems replicating the error you're getting. Could you provide a sample of your actual data using the XL2BB Tool?

hyperlink.xlsb
ABCDEFGHI
1DateValueStartEnd
21/01/20201001/01/20211/01/2027
31/01/2021100
4
51/01/202350AVERAGEIFS:93.75
6
71/01/202575AVERAGEIFS:93.75
81/01/2026
91/01/2027150
101/01/2028
111/01/2029100
12
13
Sheet3
Cell Formulas
RangeFormula
F5F5=AVERAGEIFS(C:C,A:A,">="&E2,A:A,"<="&F2)
F7F7=AVERAGEIFS(C:C,A:A,">=1/01/2021",A:A,"<=1/01/2027")
Thank you for your assistance. I am baffled by the issue but I was able to solve it. I copied and paste the data into Notepad, then copy back to excel; it work perfectly. I am guessing there was a glitch with the format, because I made sure the dates were format properly.
 
Upvote 0
Thank you for your assistance. I am baffled by the issue but I was able to solve it. I copied and paste the data into Notepad, then copy back to excel; it work perfectly. I am guessing there was a glitch with the format, because I made sure the dates were format properly.
Glad you fixed the problem :)
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,191
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top