Forum Discussion
lkorahais
Nov 17, 2021Copper Contributor
Summing the algorithm datedif
HELLO
I HAVE A PROBLEM OF CALCULATION! I USED THE FUNCTION DATEDIF TO FIND THE DIFFERENCE BETWEEN MANY DIFFRENT DATES AND THE RESULT IS THESESONE " .... years...months..days " FOR EACH CALCULATE WHICH IS NORMAL. THE PROBLEM IS THAT I WANT TO USE THE FUNCTION IF SOIF THE VALID IS TRUE IT CAN BE SUMMED I WANT TO SUM ALL THESE ".....years....months....days" BUT I CANNOT FIND A WAY TO DO THAT
.....years..........months.........days" false
.....years..........months.........days" true
.....years..........months.........days" true
total years total months total days if true sum!!
THANK YOU
I HAVE A PROBLEM OF CALCULATION! I USED THE FUNCTION DATEDIF TO FIND THE DIFFERENCE BETWEEN MANY DIFFRENT DATES AND THE RESULT IS THESESONE " .... years...months..days " FOR EACH CALCULATE WHICH IS NORMAL. THE PROBLEM IS THAT I WANT TO USE THE FUNCTION IF SOIF THE VALID IS TRUE IT CAN BE SUMMED I WANT TO SUM ALL THESE ".....years....months....days" BUT I CANNOT FIND A WAY TO DO THAT
.....years..........months.........days" false
.....years..........months.........days" true
.....years..........months.........days" true
total years total months total days if true sum!!
THANK YOU
Could you please illustrate on small sample file what you try to do.
7 Replies
- SergeiBaklanDiamond Contributor
Could you please illustrate on small sample file what you try to do.
- lkorahaisCopper Contributor
- SergeiBaklanDiamond Contributor
Thank you. Formulae could be
SUM TRUE: =SUMPRODUCT( ($B$2:$B$6 - $A$2:$A$6)*$C$2:$C$6 ) SUM FALSE: =SUMPRODUCT( ($B$2:$B$6 - $A$2:$A$6)*NOT($C$2:$C$6) ) SUM TRUE/FALSE: =G2+G3