In sheet2, Cells C5 and E5 has formulas:
=SumIf(Sheet1!B2:B27,">7 Days", Sheet1!D2:D27)
=SumIf(Sheet1!B2:B27,">30 Days", Sheet1!D2:D27)
is returning 0. Any idea why this is happening?
In sheet2, Cells C5 and E5 has formulas:
=SumIf(Sheet1!B2:B27,">7 Days", Sheet1!D2:D27)
=SumIf(Sheet1!B2:B27,">30 Days", Sheet1!D2:D27)
is returning 0. Any idea why this is happening?
Dr Liss
Not sure what's happening here but suspect that your use of the > symbol is causing Excel to try to evaluate the text entries mathematically.
If the criteria periods are all different numbers of days, you can use the * wildcard on the strings, as follows:
=SumIf(Sheet1!B2:B27,"*7*", Sheet1!D2:D27)
=SumIf(Sheet1!B2:B27,"*30*", Sheet1!D2:D27)
There seems to be nothing wrong your your formulas. Therefore the flaw must be in the data (which you don't show us). "7 Days" is a string in your formula. both "8 Days" and "7 Trays" would evaluate to being "greater than". In either case, it's a string evaluation which is different from ">"&7&" Days".
However, if I had any hand in creating the column you search I would have a cell format like "0 Days", meaning that the cell value would be only 7 and the "Days" being added by the format. In such a case you would need to look for the number only, like ...
=SumIf(Sheet1!B2:B27,">" & 7, Sheet1!D2:D27)
Whatever you do, keep track of the fact that the formula can only find what is there. Therefore please look at the values being searched.
Dear Liss,
Please attach the workbook you are referring to. I think I can solve this.
I need more Excel features for software development. Tell me where it is better to write about this question
Regards
software development
[link removed]