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.
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
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.
- SergeiBaklanJan 04, 2020Diamond Contributor
First step is click on formula in formula bar and check if correct cells / ranges are highlighted, other words if you have correct references in the formula.
Next step is staying on the cell with formula evaluate it step by step by Formulas->Evaluate Formula.
If found nothing try to simplify formula, e.g. in SUMIF() keep only one criteria, be sure it works and after that add other criteria one by one.