EOMONTH Based on Month Doesn't Consider some dates

Paiwand

New Member
Joined
Apr 14, 2018
Messages
7
Dear,

i have used this:

=AVERAGEIFS($N$4:$N$981;$J$4:$J$981;">="&(5&$AG8)+0;$J$4:$J$981;"<="&EOMONTH(5&$AG8;0))

for getting average of specific column while beside contains specific month.

N Contains Number
J Contains Dates
AG8 Contains May

but this formula seems doesn't consider that dates which is its day under 12, for example:

10/May/2018 10
20/May/2018 20
23/May/2018 30

currently it's return 25, while it should be return 20, because it doesn't consider first one because the Day is under 12.

please your help.

Thanks.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
consider
=AVERAGEIFS($N$4:$N$981,$J$4:$J$981,">="&(12&$AG8)+0,$J$4:$J$981,"<="&EOMONTH(5&$AG8,0))

N.B. Your formula considers 5-May-18. My edit shows 12-May-18.
 
Upvote 0
dear Dave,

what's the deference ? actual it doesn't work sorry, please i am still awaiting for proper feedback.
 
Upvote 0
Ensure you replace the commas to what your region requires.


Excel 2010
GHIJKLMN
4Your formula2010-May-1810
5Edited formula2520-May-1820
623-May-1830
3a
Cell Formulas
RangeFormula
H4=AVERAGEIFS($N$4:$N$981,$J$4:$J$981,">="&(5&$AG8)+0,$J$4:$J$981,"<="&EOMONTH(5&$AG8,0))
H5=AVERAGEIFS($N$4:$N$981,$J$4:$J$981,">="&(12&$AG8)+0,$J$4:$J$981,"<="&EOMONTH(5&$AG8,0))
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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