I'm trying to find the average days someone takes to make a decision within a certain period of time. For some reason, all of these lines return the same value, but that value is only correct for the last line. When I use the same structure as a formula in a worksheet, I get the correct values. The only difference that I can see between the lines, is the portion in red font.
Column AE houses formulae that determine the number of days for each decision. I don't think the formulae are the issue, as the last line below returns the correct value.
What am I missing here?
Column AE houses formulae that determine the number of days for each decision. I don't think the formulae are the issue, as the last line below returns the correct value.
Rich (BB code):
Me.txt_PAppTT = WorksheetFunction.AverageIfs(mP.Range("AE:AE"), mP.Range("P:P"), Me.cobo_Assoc.Value, mP.Range("T:T"), "Approved", mP.Range("S:S"), ">=" & CDate(Me.txt_Start), mP.Range("S:S"), "<=" & CDate(Me.txt_End))
Me.txt_PDenTT = WorksheetFunction.AverageIfs(mP.Range("AE:AE"), mP.Range("P:P"), Me.cobo_Assoc.Value, mP.Range("T:T"), "Denied", mP.Range("S:S"), ">=" & CDate(Me.txt_Start), mP.Range("S:S"), "<=" & CDate(Me.txt_End))
Me.txt_PTT = WorksheetFunction.AverageIfs(mP.Range("AE:AE"), mP.Range("P:P"), Me.cobo_Assoc.Value, mP.Range("S:S"), ">=" & CDate(Me.txt_Start), mP.Range("S:S"), "<=" & CDate(Me.txt_End))
What am I missing here?