Forum Discussion
How to sumif for multiple criteria in a single column?
- Aug 14, 2024
ChrisTheWizard The screenshot suggests that you are on using the mobile version of Excel. Then the attached example, created on the desktop, should work for you as well.
No doubt, other will contribute alternative solutions.
When you use a structured table (like in my example) it doesn't matter where the data sits in your workbook. Excel will find it by the table name. If you can't (or don't want to) use a structured table, you can replace the table/column references with absolute sheet/cell references.
With regard to JKPieterse 's formula, he merely tried to demonstrate that you need to sum the results of two formulas. One for Taxi and one for Cash. Tried it and it works. However, you still want to include the condition that look at the financial year from July 1, 2024 to June 30, 2025. and then it becomes messy.
Based on my example, you would want to use two separate FILTER functions and SUM these. It would then be:
=SUM(
FILTER(Table1[Cash],(Table1[Date]>=DATE(YEAR(TODAY()),7,1))*(Table1[Date]<=DATE(YEAR(TODAY())+1,6,30))*(Table1[Description]="Taxi")),
FILTER(Table1[Cash],(Table1[Date]>=DATE(YEAR(TODAY()),7,1))*(Table1[Date]<=DATE(YEAR(TODAY())+1,6,30))*(Table1[Description]="Cash"))
)
But, with all that repeating code, LET would be more efficient, I believe.
If you can't get it to work, perhaps best if you share a link giving full access to your own file, stored on OneDrive, Dropbox or similar.
I decided on LET but my phone keeps saying "There's a problem with this formula."
https://1drv.ms/x/s!AqSkT5cvQtioryF-mGEhgNa6pDAw
Here's the url to my OneDrive file. I have completely rewritten this in excel vs copy and paste so shouldn't be any invalid characters.
What am I doing wrong?
Edit: I wrote an apostrophe in front of the formula so I can show you.
- JKPieterseAug 16, 2024Silver ContributorSeveral things.
- The data on the second sheet needs to be formatted as Table (Format as Table from the Home tab)
- There is a trailing space after "Description" on the second tab
- The formula has a couple of closing parentheses in the wrong place, I fixed those for the yellow cell.- ChrisTheWizardAug 16, 2024Copper ContributorThank you so much for the reply and now I know for future projects. Cheers. 😁