Forum Discussion
=Sumif wont return value!
Can someone assist me with this formula, and why it won't add up the sums, please?
3 Replies
- Mks_1973Iron Contributor
Please check these:
Ensure that the cells in the Total column (Q) are formatted as numbers and not text.
In SUMIFS, each range must be the same size. Make sure that all ranges in your formula (e.g., T13:T318, E13:E318, etc.)
Double-check that the criteria you’re using in your formula are exactly as they appear in the table (case-sensitive and without extra spaces)
please verify you formula would be =SUMIFS(T13:T318, E13:E318, "CA", B13:B318, ">=01/01/2024", B13:B318, "<=01/31/2024")
You may want to use actual date cells instead of hardcoding dates:
=SUMIFS(T13:T318, E13:E318, "CA", B13:B318, ">="&DATE(2024,1,1), B13:B318, "<="&DATE(2024,1,31))
This approach avoids issues with regional date formats.
Try testing each condition separately to ensure they return expected results:
Test with just the Account criterion: =SUMIFS(T13:T318, E13:E318, "CA")
Then add the date range criteria one by one
===================================
If SUMIFS still doesn’t work, you could try using SUMPRODUCT
=SUMPRODUCT((E13:E318="CA")*(B13:B318>=DATE(2024,1,1))*(B13:B318<=DATE(2024,1,31)), T13:T318) - Harun24HRBronze Contributor
Can you attach a sample file or share via OneDrive or GoogleDrive?
- SnowMan55Bronze Contributor
Suggestions:
- Verify that column I contains numbers (rather than text values). For example, use formulas such as =TYPE(I14) in otherwise unused cells; the returned values should be 1. Documentation: https://support.microsoft.com/en-us/office/type-function-45b4e688-4bc3-48b3-a105-ffa892995899
- Verify that column E values do not include trailing (or leading) spaces.
- Use "sticky" cell addresses (either mixed or absolute addresses) when referencing the values in columns B, E, and I. Specifically, put dollar signs immediately in front of the "13"s and "13318"s; dollar signs in front of the column letters are optional. If you don't do the former, Excel will modify those row numbers as you copy the formula from Q14 down.