Forum Discussion
Date format in a criteria (need month instead of date)
- Jan 04, 2020
In cell B4 you have concrete date, in particular 01 Jan 2020. What formula do is take this date and SUMIF() all data which are later than 31 Dec 2019 /EOMONTH(B4,-1)/ AND earlier or equal to 31 Jan 2020 /EOMONTH(B4,0)/.
Other words it sums all data for January 2020. If in B4 it will be 01 Feb 2020 it sums for February 2020.
If you need to sum for all Januaries, i.e. for January 2020 plus January 2021 plus etc. - that will be another formula.
Can you please elaborate the formula.
I wish to get the month name in Cell B4 such that it becomes my criteria.
Regards
Another variant is
=SUMIFS(
$F$10:$F$18,
$B$10:$B$18,">"&EOMONTH($B$4,-1),
$B$10:$B$18,"<="&EOMONTH($B$4,0),
$C$10:$C$18,$C4,
$D$10:$D$18,$D4
)
if calculate for the month of given year.
- pillaisgJan 04, 2020Copper Contributor
what I am looking for is the month (January, February, March) based on the column B values in Cell B4.
So that I can take the sumifs for the particular month.
ThanksSergeiBaklan
- SergeiBaklanJan 04, 2020Diamond Contributor
In cell B4 you have concrete date, in particular 01 Jan 2020. What formula do is take this date and SUMIF() all data which are later than 31 Dec 2019 /EOMONTH(B4,-1)/ AND earlier or equal to 31 Jan 2020 /EOMONTH(B4,0)/.
Other words it sums all data for January 2020. If in B4 it will be 01 Feb 2020 it sums for February 2020.
If you need to sum for all Januaries, i.e. for January 2020 plus January 2021 plus etc. - that will be another formula.
- pillaisgJan 04, 2020Copper Contributor
Both the formula worked fine for me... but when I am trying to do the same thing in other cell it is returning error.
I am wondering how to find the error (evaluating the formula)
Is there any possible way to check the formula how far it was correct and where the mistake happened section by section.