How can I use SUMIF to extract dates only newer than 7 days, 14 days etc.?
I work in a production environment where we want to keep a simple log of issues that may prop up with our machinery during production, the two columns relevant for this issue;
Date | Hours until resolution |
---|
I want to keep separate sheets for each machine and then display the downtime for each machine for the previous 7, 14, 21 etc. days. To sum the amount of downtime hours from X days ago until now I'm trying do use this formula;
=SUMIF('Machine A'!A2:A99; ">TODAY()-7"; 'Machine A'!E2:E99)
and I can not for the life of me figure out why the criteria isn't giving me what I want. I've used the examples from here to try and find an alternative solution which doesn't work either, the formula either sums ALL numbers within the range or NONE of them.
Solution 1:
As explained on the link from the OP, you must concatenate an operator to the date. Change your criteria like below:
=SUMIF('Machine A'!A2:A99; ">" & TODAY()-7; 'Machine A'!E2:E99)