Aug 13 2024 10:17 PM - edited Aug 14 2024 02:23 AM
As an example. I want to sum everything in D column for this financial year with the Description of "Taxi" and "Cash"
=SUMIFS(Data!D:D,Data!A:A,">="& DATE(YEAR(TODAY()),7,1),Data!A:A,"<=" & DATE(YEAR(TODAY())+1,6,30),Data! E:E,"Cash",Data!E:E,"Taxi")
This returns 0. Is it because I need to add multiple sumifs statements together or am I missing something in my statement?
Aug 14 2024 12:41 AM
Solution@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.
Aug 14 2024 12:47 AM
@ChrisTheWizard The SUMIFS function restricts you to AND logic of the criteria. To use OR, you can switch to using the SUM function. Here is a simplified example summing column A only if column E equals Cash OR Taxi.
=SUM(Data!A:A*((Data!E:E="Cash")+(Data!E:E="Taxi")))
Aug 14 2024 02:10 AM - edited Aug 14 2024 02:23 AM
Not quite
Trying to sum D but
=SUM(Data!D:D*((Data!E:E="Cash")+(Data!E:E="Taxi")))
returns #value.
Aug 14 2024 02:14 AM - edited Aug 14 2024 02:19 AM
How to do from a separate sheet. For example data sheet is called "Data".
Also on mobile it doesn't like the formula. I'll try adding it on desktop first. The spreadsheet you attached works fine but If I copy and paste the formula... It's like some of the characters go across all weird.
Aug 14 2024 02:54 AM
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.
Aug 16 2024 04:20 AM - edited Aug 16 2024 04:22 AM
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.
Aug 16 2024 05:55 AM
Aug 16 2024 07:41 AM
Aug 16 2024 07:42 AM
Aug 14 2024 12:41 AM
Solution@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.